aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32/l1/stm32l-discovery/button-irq-printf/syscfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/stm32/l1/stm32l-discovery/button-irq-printf/syscfg.h')
-rw-r--r--examples/stm32/l1/stm32l-discovery/button-irq-printf/syscfg.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/examples/stm32/l1/stm32l-discovery/button-irq-printf/syscfg.h b/examples/stm32/l1/stm32l-discovery/button-irq-printf/syscfg.h
index 32cf465..d278ac4 100644
--- a/examples/stm32/l1/stm32l-discovery/button-irq-printf/syscfg.h
+++ b/examples/stm32/l1/stm32l-discovery/button-irq-printf/syscfg.h
@@ -1,7 +1,20 @@
/*
- * General configuration of the device
+ * This file is part of the libopencm3 project.
*
- * Karl Palsson <karlp@tweak.net.au> 2012
+ * Copyright (C) 2012 Karl Palsson <karlp@tweak.net.au>
+ *
+ * This library is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This library 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SYSCFG_H
@@ -11,8 +24,8 @@
extern "C" {
#endif
-#include <libopencm3/stm32/l1/gpio.h>
-#include <libopencm3/stm32/l1/nvic.h>
+#include <libopencm3/cm3/nvic.h>
+#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/exti.h>
#include <libopencm3/stm32/usart.h>
@@ -31,10 +44,10 @@ extern "C" {
#define BUTTON_DISCO_USER_isr exti0_isr
#define BUTTON_DISCO_USER_NVIC NVIC_EXTI0_IRQ
-
- struct state_t {
- bool falling;
- };
+ struct state_t {
+ bool falling;
+ int tickcount;
+ };
#ifdef __cplusplus