diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2015-07-29 17:06:17 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2015-07-29 17:06:17 +0900 |
commit | a9de53c36be5ca31974cbf3c7903ca5cf7f7fff2 (patch) | |
tree | 0ff6c70ab4d493e907d5f4f1e8ee8584580bde8b /board/board-fst-01.h | |
parent | 83486efd5f7857e539c79ed9c947cec854468240 (diff) |
board update, adding ST Dongle
Diffstat (limited to 'board/board-fst-01.h')
-rw-r--r-- | board/board-fst-01.h | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/board/board-fst-01.h b/board/board-fst-01.h index 56cd132..97262cd 100644 --- a/board/board-fst-01.h +++ b/board/board-fst-01.h @@ -2,7 +2,6 @@ #define BOARD_ID 0x696886af /* echo -n "FST-01" | sha256sum | sed -e 's/^.*\(........\) -$/\1/' */ -#define FLASH_PAGE_SIZE 1024 #define STM32F10X_MD /* Medium-density device */ #define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 @@ -15,19 +14,6 @@ #define GPIO_USB_SET_TO_ENABLE 10 #undef GPIO_OTHER_BASE -/* For pin-cir settings of Gnuk */ -#define TIMx TIM2 -#define INTR_REQ_TIM TIM2_IRQ -#define AFIO_EXTICR_INDEX 0 -#define AFIO_EXTICR1_EXTIx_Py AFIO_EXTICR1_EXTI2_PA -#define EXTI_PR EXTI_PR_PR2 -#define EXTI_IMR EXTI_IMR_MR2 -#define EXTI_FTSR_TR EXTI_FTSR_TR2 -#define INTR_REQ_EXTI EXTI2_IRQ -#define ENABLE_RCC_APB1 -#define RCC_APBnENR_TIMxEN RCC_APB1ENR_TIM2EN -#define RCC_APBnRSTR_TIMxRST RCC_APB1RSTR_TIM2RST - /* * Port A setup. * PA0 - input with pull-up (TIM2_CH1): AN0 for NeuG @@ -65,3 +51,34 @@ #define RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN) #define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPBRST) + +/* + * Board specific information other than clock and GPIO initial + * setting should not be in board-*.h, but each driver should include + * information by itself. + * + * Please see NeuG's ADC driver how board specific handling is done. + * + * Given the situation of Chopstx's boards support, which is not that + * huge, this works well. If scalability and flexibility will matter, + * we will need something like device tree in which boot process can + * pass information to application program. + * + * Following constants are here, because experimental CIR driver is + * written before this design decision of Chopstx. + * + * Those will be removed soon, once such an driver will be improved + * in new style. + */ +/* For pin-cir settings of Gnuk */ +#define TIMx TIM2 +#define INTR_REQ_TIM TIM2_IRQ +#define AFIO_EXTICR_INDEX 0 +#define AFIO_EXTICR1_EXTIx_Py AFIO_EXTICR1_EXTI2_PA +#define EXTI_PR EXTI_PR_PR2 +#define EXTI_IMR EXTI_IMR_MR2 +#define EXTI_FTSR_TR EXTI_FTSR_TR2 +#define INTR_REQ_EXTI EXTI2_IRQ +#define ENABLE_RCC_APB1 +#define RCC_APBnENR_TIMxEN RCC_APB1ENR_TIM2EN +#define RCC_APBnRSTR_TIMxRST RCC_APB1RSTR_TIM2RST |