aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2015-06-29 15:58:21 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2015-06-29 15:58:21 +0900
commit97b4471cee86b4d7efc23d272db80fb89c7c8ab2 (patch)
treed066750a7976c25ae9e9c3f20ba8c7a91d5e7c6d /board
parent15ae2d8b3242c74c736f7d723125d0b6de367805 (diff)
Make it clear LED is mandatory.
Diffstat (limited to 'board')
-rw-r--r--board/board-fst-01-00.h14
-rw-r--r--board/board-fst-01.h14
-rw-r--r--board/board-maple-mini.h27
-rw-r--r--board/board-olimex-stm32-h103.h14
-rw-r--r--board/board-stbee-mini.h27
-rw-r--r--board/board-stbee.h15
-rw-r--r--board/board-stm32-primer2.h29
-rw-r--r--board/board-stm8s-discovery.h15
8 files changed, 91 insertions, 64 deletions
diff --git a/board/board-fst-01-00.h b/board/board-fst-01-00.h
index a00995e..5af9f56 100644
--- a/board/board-fst-01-00.h
+++ b/board/board-fst-01-00.h
@@ -4,8 +4,11 @@
#define STM32_PLLMUL_VALUE 9
#define STM32_HSECLK 8000000
-#define GPIO_USB_SET_TO_ENABLE 10
+#define GPIO_LED_BASE GPIOA_BASE
#define GPIO_LED_SET_TO_EMIT 8
+#define GPIO_USB_BASE GPIOA_BASE
+#define GPIO_USB_SET_TO_ENABLE 10
+#undef GPIO_OTHER_BASE
/*
* Port A setup.
@@ -18,12 +21,9 @@
* ------------------------ Default
* PAx - input with pull-up
*/
-#define VAL_GPIO_ODR 0xFFFFE7FF
-#define VAL_GPIO_CRL 0x88888888 /* PA7...PA0 */
-#define VAL_GPIO_CRH 0x88811383 /* PA15...PA8 */
-
-#define GPIO_USB_BASE GPIOA_BASE
-#define GPIO_LED_BASE GPIOA_BASE
+#define VAL_GPIO_LED_ODR 0xFFFFE7FF
+#define VAL_GPIO_LED_CRL 0x88888888 /* PA7...PA0 */
+#define VAL_GPIO_LED_CRH 0x88811383 /* PA15...PA8 */
#define RCC_ENR_IOP_EN RCC_APB2ENR_IOPAEN
#define RCC_RSTR_IOP_RST RCC_APB2RSTR_IOPARST
diff --git a/board/board-fst-01.h b/board/board-fst-01.h
index 40e98d7..efd4761 100644
--- a/board/board-fst-01.h
+++ b/board/board-fst-01.h
@@ -4,8 +4,11 @@
#define STM32_PLLMUL_VALUE 6
#define STM32_HSECLK 12000000
-#define GPIO_USB_SET_TO_ENABLE 10
+#define GPIO_LED_BASE GPIOB_BASE
#define GPIO_LED_SET_TO_EMIT 0
+#define GPIO_USB_BASE GPIOA_BASE
+#define GPIO_USB_SET_TO_ENABLE 10
+#undef GPIO_OTHER_BASE
/* For pin-cir settings of Gnuk */
#define TIMx TIM2
@@ -40,9 +43,9 @@
* PA14 - input with pull-up.
* PA15 - input with pull-up.
*/
-#define VAL_GPIO_ODR 0xFFFFE7FD
-#define VAL_GPIO_CRL 0xBBB38888 /* PA7...PA0 */
-#define VAL_GPIO_CRH 0x88811388 /* PA15...PA8 */
+#define VAL_GPIO_USB_ODR 0xFFFFE7FD
+#define VAL_GPIO_USB_CRL 0xBBB38888 /* PA7...PA0 */
+#define VAL_GPIO_USB_CRH 0x88811388 /* PA15...PA8 */
/*
* Port B setup.
@@ -55,9 +58,6 @@
#define VAL_GPIO_LED_CRL 0x88888883 /* PA7...PA0 */
#define VAL_GPIO_LED_CRH 0x88888888 /* PA15...PA8 */
-#define GPIO_USB_BASE GPIOA_BASE
-#define GPIO_LED_BASE GPIOB_BASE
-
#define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN)
#define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPBRST)
diff --git a/board/board-maple-mini.h b/board/board-maple-mini.h
index 92557e2..5e17118 100644
--- a/board/board-maple-mini.h
+++ b/board/board-maple-mini.h
@@ -4,8 +4,24 @@
#define STM32_PLLMUL_VALUE 9
#define STM32_HSECLK 8000000
-#define GPIO_USB_CLEAR_TO_ENABLE 9
+#define GPIO_LED_BASE GPIOB_BASE
#define GPIO_LED_SET_TO_EMIT 1
+#define GPIO_USB_BASE GPIOB_BASE
+#define GPIO_USB_CLEAR_TO_ENABLE 9
+#define GPIO_OTHER_BASE GPIOA_BASE
+
+/*
+ * Port A setup.
+ * PA0 - input with pull-up. AN0
+ * PA1 - input with pull-up. AN1
+ * 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_OTHER_ODR 0xFFFFE7FF
+#define VAL_GPIO_OTHER_CRL 0x88888888 /* PA7...PA0 */
+#define VAL_GPIO_OTHER_CRH 0x88811888 /* PA15...PA8 */
/*
* Port B setup.
@@ -14,12 +30,9 @@
* ------------------------ Default
* PBx - input with pull-up
*/
-#define VAL_GPIO_ODR 0xFFFFFFFF
-#define VAL_GPIO_CRL 0x88888838 /* PB7...PB0 */
-#define VAL_GPIO_CRH 0x88888838 /* PB15...PB8 */
-
-#define GPIO_USB_BASE GPIOB_BASE
-#define GPIO_LED_BASE GPIOB_BASE
+#define VAL_GPIO_LED_ODR 0xFFFFFFFF
+#define VAL_GPIO_LED_CRL 0x88888838 /* PB7...PB0 */
+#define VAL_GPIO_LED_CRH 0x88888838 /* PB15...PB8 */
#define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN)
#define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPBRST)
diff --git a/board/board-olimex-stm32-h103.h b/board/board-olimex-stm32-h103.h
index 07edfa5..4ad6bfc 100644
--- a/board/board-olimex-stm32-h103.h
+++ b/board/board-olimex-stm32-h103.h
@@ -4,8 +4,11 @@
#define STM32_PLLMUL_VALUE 9
#define STM32_HSECLK 8000000
-#define GPIO_USB_CLEAR_TO_ENABLE 11
+#define GPIO_LED_BASE GPIOC_BASE
#define GPIO_LED_CLEAR_TO_EMIT 12
+#define GPIO_USB_BASE GPIOC_BASE
+#define GPIO_USB_CLEAR_TO_ENABLE 11
+#undef GPIO_OTHER_BASE
/*
* Port C setup.
@@ -18,12 +21,9 @@
* ------------------------ Default
* PCx - input with pull-up
*/
-#define VAL_GPIO_ODR 0xFFFFFFFF
-#define VAL_GPIO_CRL 0x44888888 /* PC7...PC0 */
-#define VAL_GPIO_CRH 0x88837888 /* PC15...PC8 */
-
-#define GPIO_USB_BASE GPIOC_BASE
-#define GPIO_LED_BASE GPIOC_BASE
+#define VAL_GPIO_LED_ODR 0xFFFFFFFF
+#define VAL_GPIO_LED_CRL 0x44888888 /* PC7...PC0 */
+#define VAL_GPIO_LED_CRH 0x88837888 /* PC15...PC8 */
#define RCC_ENR_IOP_EN RCC_APB2ENR_IOPCEN
#define RCC_RSTR_IOP_RST RCC_APB2RSTR_IOPCRST
diff --git a/board/board-stbee-mini.h b/board/board-stbee-mini.h
index 9e92f66..15e8dd0 100644
--- a/board/board-stbee-mini.h
+++ b/board/board-stbee-mini.h
@@ -4,8 +4,10 @@
#define STM32_PLLMUL_VALUE 6
#define STM32_HSECLK 12000000
-#define GPIO_USB_SET_TO_ENABLE 14
+#define GPIO_LED_BASE GPIOA_BASE
#define GPIO_LED_CLEAR_TO_EMIT 13
+#define GPIO_USB_BASE GPIOA_BASE
+#define GPIO_USB_SET_TO_ENABLE 14
#if defined(PINPAD_CIR_SUPPORT) || defined(PINPAD_DIAL_SUPPORT)
#define HAVE_7SEGLED 1
@@ -49,19 +51,20 @@
* PA14 - Push pull output (USB ENABLE 0:DISABLE 1:ENABLE)
* PA15 - Open Drain output (LED2 0:ON 1:OFF)
*/
-#define VAL_GPIO_ODR 0xFFFFE77F
-#define VAL_GPIO_CRL 0x88888888 /* PA7...PA0 */
-#define VAL_GPIO_CRH 0x63611888 /* PA15...PA8 */
+#define VAL_GPIOA_ODR 0xFFFFE77F
+#define VAL_GPIOA_CRL 0x88888888 /* PA7...PA0 */
+#define VAL_GPIOA_CRH 0x63611888 /* PA15...PA8 */
+#define GPIO_OTHER_BASE GPIOB_BASE
/*
* Port B setup.
* PB0 - Push pull output (LED 1:ON 0:OFF)
* ------------------------ Default
* PBx - input with pull-up.
*/
-#define VAL_GPIO_LED_ODR 0xFFFFFFFF
-#define VAL_GPIO_LED_CRL 0x88888888 /* PB7...PB0 */
-#define VAL_GPIO_LED_CRH 0x66666666 /* PB15...PB8 */
+#define VAL_GPIO_OTHER_ODR 0xFFFFFFFF
+#define VAL_GPIO_OTHER_CRL 0x88888888 /* PB7...PB0 */
+#define VAL_GPIO_OTHER_CRH 0x66666666 /* PB15...PB8 */
/* Port B setup. */
#define GPIOB_CIR 0
@@ -93,17 +96,17 @@
* PA14 - Push pull output (USB ENABLE 0:DISABLE 1:ENABLE)
* PA15 - Open Drain output (LED2 0:ON 1:OFF)
*/
-#define VAL_GPIO_ODR 0xFFFFE7FF
-#define VAL_GPIO_CRL 0x88888888 /* PA7...PA0 */
-#define VAL_GPIO_CRH 0x63611888 /* PA15...PA8 */
+#define VAL_GPIO_LED_ODR 0xFFFFE7FF
+#define VAL_GPIO_LED_CRL 0x88888888 /* PA7...PA0 */
+#define VAL_GPIO_LED_CRH 0x63611888 /* PA15...PA8 */
+
+#undef GPIO_OTHER_BASE
#define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_AFIOEN)
#define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_AFIORST)
#endif
-#define GPIO_USB_BASE GPIOA_BASE
-#define GPIO_LED_BASE GPIOA_BASE
#define AFIO_MAPR_SOMETHING AFIO_MAPR_SWJ_CFG_DISABLE
/* NeuG settings for ADC2. */
diff --git a/board/board-stbee.h b/board/board-stbee.h
index a12ec44..8104b5c 100644
--- a/board/board-stbee.h
+++ b/board/board-stbee.h
@@ -4,8 +4,11 @@
#define STM32_PLLMUL_VALUE 6
#define STM32_HSECLK 12000000
-#define GPIO_USB_CLEAR_TO_ENABLE 3
+#define GPIO_LED_BASE GPIOD_BASE
#define GPIO_LED_CLEAR_TO_EMIT 4
+#define GPIO_USB_BASE GPIOD_BASE
+#define GPIO_USB_CLEAR_TO_ENABLE 3
+#define GPIO_OTHER_BASE GPIOA_BASE
/*
* Port A setup.
@@ -25,13 +28,9 @@
* PD3 - Push pull output (USB_DISC 1:USB-DISABLE 0:USB-ENABLE) 2MHz
* PD4 - Open Drain output 2MHz (LED1).
*/
-#define VAL_GPIO_ODR 0xFFFFFFFF
-#define VAL_GPIO_CRL 0x88862888 /* PD7...PD0 */
-#define VAL_GPIO_CRH 0x88888888 /* PD15...PD8 */
-
-#define GPIO_USB_BASE GPIOD_BASE
-#define GPIO_LED_BASE GPIOD_BASE
-#define GPIO_OTHER_BASE GPIOA_BASE
+#define VAL_GPIO_LED_ODR 0xFFFFFFFF
+#define VAL_GPIO_LED_CRL 0x88862888 /* PD7...PD0 */
+#define VAL_GPIO_LED_CRH 0x88888888 /* PD15...PD8 */
/* NeuG settings for ADC2. */
#define NEUG_ADC_SETTING2_SMPR1 ADC_SMPR1_SMP_AN10(ADC_SAMPLE_1P5) \
diff --git a/board/board-stm32-primer2.h b/board/board-stm32-primer2.h
index 4cc5e8a..9f6cc67 100644
--- a/board/board-stm32-primer2.h
+++ b/board/board-stm32-primer2.h
@@ -4,8 +4,24 @@
#define STM32_PLLMUL_VALUE 6
#define STM32_HSECLK 12000000
-#define GPIO_USB_CLEAR_TO_ENABLE 3
+#define GPIO_LED_BASE GPIOE_BASE
#define GPIO_LED_CLEAR_TO_EMIT 0
+#define GPIO_USB_BASE GPIOD_BASE
+#define GPIO_USB_CLEAR_TO_ENABLE 3
+#define GPIO_OTHER_BASE GPIOA_BASE
+
+/*
+ * Port A setup.
+ * PA0 - input with pull-up. AN0
+ * PA1 - input with pull-up. AN1
+ * 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_OTHER_ODR 0xFFFFE7FF
+#define VAL_GPIO_OTHER_CRL 0x88888888 /* PA7...PA0 */
+#define VAL_GPIO_OTHER_CRH 0x88811888 /* PA15...PA8 */
/*
* Port D setup.
@@ -13,24 +29,21 @@
* ------------------------ Default
* PDx - input with pull-up
*/
-#define VAL_GPIO_ODR 0xFFFFFFFF
-#define VAL_GPIO_CRL 0x88883888 /* PD7...PD0 */
-#define VAL_GPIO_CRH 0x88888888 /* PD15...PD8 */
+#define VAL_GPIO_USB_ODR 0xFFFFFFFF
+#define VAL_GPIO_USB_CRL 0x88883888 /* PD7...PD0 */
+#define VAL_GPIO_USB_CRH 0x88888888 /* PD15...PD8 */
/*
* Port E setup.
* PE0 - Push pull output (LED 1:ON 0:OFF)
* PE1 - Push pull output (LED 1:ON 0:OFF)
* ------------------------ Default
- * PCx - input with pull-up
+ * PEx - input with pull-up
*/
#define VAL_GPIO_LED_ODR 0xFFFFFFFF
#define VAL_GPIO_LED_CRL 0x88888833 /* PE7...PE0 */
#define VAL_GPIO_LED_CRH 0x88888888 /* PE15...PE8 */
-#define GPIO_USB_BASE GPIOD_BASE
-#define GPIO_LED_BASE GPIOE_BASE
-
#define RCC_ENR_IOP_EN \
(RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPDEN | RCC_APB2ENR_IOPEEN)
#define RCC_RSTR_IOP_RST \
diff --git a/board/board-stm8s-discovery.h b/board/board-stm8s-discovery.h
index c4d52ea..79d1889 100644
--- a/board/board-stm8s-discovery.h
+++ b/board/board-stm8s-discovery.h
@@ -4,8 +4,11 @@
#define STM32_PLLMUL_VALUE 9
#define STM32_HSECLK 8000000
-#undef GPIO_USB_CLEAR_TO_ENABLE
+#define GPIO_LED_BASE GPIOA_BASE
#define GPIO_LED_SET_TO_EMIT 8
+#undef GPIO_USB_BASE
+#undef GPIO_USB_CLEAR_TO_ENABLE
+#define GPIO_OTHER_BASE GPIOB_BASE
/* For pin-cir settings of Gnuk */
#define TIMx TIM3
@@ -32,12 +35,9 @@
* ------------------------ 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 */
-
-#define GPIO_USB_BASE GPIOA_BASE
-#define GPIO_LED_BASE GPIOA_BASE
+#define VAL_GPIO_LED_ODR 0xFFFFE7FF
+#define VAL_GPIO_LED_CRL 0x88888888 /* PA7...PA0 */
+#define VAL_GPIO_LED_CRH 0x88811881 /* PA15...PA8 */
#define RCC_ENR_IOP_EN \
(RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN | RCC_APB2ENR_AFIOEN)
@@ -46,7 +46,6 @@
/* NeuG settings for ADC2 is default (PA0: Analog IN0, PA1: Analog IN1). */
-#define GPIO_OTHER_BASE GPIOB_BASE
/*
* Port B setup.
* PB4 - (TIM3_CH1) input with pull-up