From 60e0fbd189ec02c7817e7db649cb41f70d445525 Mon Sep 17 00:00:00 2001
From: NIIBE Yutaka <gniibe@fsij.org>
Date: Thu, 6 Jun 2013 10:56:17 +0900
Subject: update board-*.h

---
 board/board-fst-01-00.h         | 29 +++++++++++++++++++++++++++++
 board/board-fst-01.h            | 27 +++++++++++++++++++++++++++
 board/board-olimex-stm32-h103.h | 15 +++++++++------
 board/board-stm8s-discovery.h   | 12 ++++++++++++
 4 files changed, 77 insertions(+), 6 deletions(-)
 create mode 100644 board/board-fst-01-00.h

(limited to 'board')

diff --git a/board/board-fst-01-00.h b/board/board-fst-01-00.h
new file mode 100644
index 0000000..2e9e768
--- /dev/null
+++ b/board/board-fst-01-00.h
@@ -0,0 +1,29 @@
+#define STM32_PLLXTPRE			STM32_PLLXTPRE_DIV1
+#define STM32_PLLMUL_VALUE		9
+#define STM32_HSECLK			8000000
+
+#define GPIO_USB_SET_TO_ENABLE		10
+#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 50MHz (LED 1:ON 0:OFF)
+ * PA10 - Push pull output 50MHz (USB 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            0x88811383      /* PA15...PA8 */
+
+#define GPIO_USB_BASE	GPIOA_BASE
+#define GPIO_LED_BASE	GPIOA_BASE
+
+#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).  */
diff --git a/board/board-fst-01.h b/board/board-fst-01.h
index fae1945..e29173e 100644
--- a/board/board-fst-01.h
+++ b/board/board-fst-01.h
@@ -5,10 +5,37 @@
 #define GPIO_USB_SET_TO_ENABLE		10
 #define GPIO_LED_SET_TO_EMIT		0
 
+/*
+ * Port A setup.
+ * PA0  - input with pull-up (TIM2_CH1): AN0 for NeuG
+ * PA1  - input with pull-down (TIM2_CH2)
+ * PA2  - input with pull-up (TIM2_CH3) connected to CIR module
+ * PA3  - input with pull-up: external pin available to user
+ * PA4  - Push pull output           (SPI1_NSS)
+ * PA5  - Alternate Push pull output (SPI1_SCK)
+ * PA6  - Alternate Push pull output (SPI1_MISO)
+ * PA7  - Alternate Push pull output (SPI1_MOSI)
+ * PA10 - Push pull output   (USB 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
+ * PA8  - input with pull-up.
+ * PA9  - input with pull-up.
+ * PA13 - input with pull-up.
+ * 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 */
 
+/*
+ * Port B setup.
+ * PB0  - Push pull output   (LED 1:ON 0:OFF)
+ * PB1  - input with pull-up: AN9 for NeuG
+ * ------------------------ Default
+ * PBx  - input with pull-up.
+ */
 #define VAL_GPIO_LED_ODR            0xFFFFFFFF
 #define VAL_GPIO_LED_CRL            0x88888883      /*  PA7...PA0 */
 #define VAL_GPIO_LED_CRH            0x88888888      /* PA15...PA8 */
diff --git a/board/board-olimex-stm32-h103.h b/board/board-olimex-stm32-h103.h
index 7063ab3..b738539 100644
--- a/board/board-olimex-stm32-h103.h
+++ b/board/board-olimex-stm32-h103.h
@@ -6,12 +6,15 @@
 #define GPIO_LED_CLEAR_TO_EMIT		12
 
 /*
- * PC0  - Digital input with PullUp.  AN10 for NeuG
- * PC1  - Digital input with PullUp.  AN11 for NeuG
- * PC6  - Normal input because there is an external resistor.
- * PC7  - Normal input because there is an external resistor.
- * PC11 - Open Drain output (USB disconnect).
- * PC12 - Push Pull output (LED).
+ * Port C setup.
+ * PC0  - input with pull-up.  AN10 for NeuG
+ * PC1  - input with pull-up.  AN11 for NeuG
+ * PC6  - input without pull-up/down
+ * PC7  - input without pull-up/down
+ * PC11 - Open-drain output 50MHz (USB disconnect).
+ * PC12 - Push Pull output 50MHz (LED).
+ * ------------------------ Default
+ * PCx  - input with pull-up
  */
 #define VAL_GPIO_ODR            0xFFFFFFFF
 #define VAL_GPIO_CRL            0x44888888      /*  PC7...PC0 */
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).  */
-- 
cgit v1.2.3