aboutsummaryrefslogtreecommitdiff
path: root/board/board-stm8s-discovery.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2013-06-06 10:56:17 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2013-06-06 10:56:17 +0900
commit60e0fbd189ec02c7817e7db649cb41f70d445525 (patch)
treec664a03502738f787d8229c2181be6f89b92338b /board/board-stm8s-discovery.h
parent5540f9b08a2b997aaa4bfbe3aa8bbaa571945eaa (diff)
update board-*.h
Diffstat (limited to 'board/board-stm8s-discovery.h')
-rw-r--r--board/board-stm8s-discovery.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/board-stm8s-discovery.h b/board/board-stm8s-discovery.h
index 6be488a..d43caf7 100644
--- a/board/board-stm8s-discovery.h
+++ b/board/board-stm8s-discovery.h
@@ -5,6 +5,16 @@
#undef GPIO_USB_CLEAR_TO_ENABLE
#define GPIO_LED_SET_TO_EMIT 8
+/*
+ * Port A setup.
+ * PA0 - input with pull-up. AN0
+ * PA1 - input with pull-up. AN1
+ * PA8 - Push pull output 10MHz (LED 1:ON 0:OFF)
+ * PA11 - Push Pull output 10MHz 0 default (until USB enabled) (USBDM)
+ * PA12 - Push Pull output 10MHz 0 default (until USB enabled) (USBDP)
+ * ------------------------ Default
+ * PAx - input with pull-up
+ */
#define VAL_GPIO_ODR 0xFFFFE7FF
#define VAL_GPIO_CRL 0x88888888 /* PA7...PA0 */
#define VAL_GPIO_CRH 0x88811881 /* PA15...PA8 */
@@ -14,3 +24,5 @@
#define RCC_APB2ENR_IOP_EN (RCC_APB2ENR_IOPAEN)
#define RCC_APB2RSTR_IOP_RST (RCC_APB2RSTR_IOPARST)
+
+/* NeuG settings for ADC2 is default (PA0: Analog IN0, PA1: Analog IN1). */