From 2c72108ae0644a4317a00928cbb01d9ca3821a59 Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 25 Jan 2022 18:34:05 +0100 Subject: Add license header and minor improvements --- firmware/main.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index 8e39278..264d3f5 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -1,6 +1,27 @@ // vim: shiftwidth=4 tabstop=4 noexpandtab +/* + ledcontrol firmware + Copyright (C) 2021 xengineering + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + Contact: me@xengineering.eu +*/ + + #include #include #include @@ -15,11 +36,10 @@ static void timer_init(void); void tim2_isr(void); -void main(void) +int main(void) { clock_init(); gpio_init(); - gpio_clear(GPIOC, GPIO13); // set onboard LED on nvic_init(); timer_init(); @@ -56,6 +76,7 @@ static void gpio_init(void) GPIO_CNF_OUTPUT_PUSHPULL, GPIO13 ); + gpio_clear(GPIOC, GPIO13); // set initial value to 'on' // setup PB0 (connected to TIM3_CH3) for PWM gpio_set_mode( -- cgit v1.2.3-70-g09d2