diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-21 15:16:29 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-05-21 15:16:59 +0900 |
commit | c198c0a82526292ed31a37ae837185f2e679e844 (patch) | |
tree | d5794b9406f9d9da5b8ce416a7e2a10d12ace67b /board |
Initial commit
Diffstat (limited to 'board')
-rw-r--r-- | board/board-fst-01.h | 20 | ||||
-rw-r--r-- | board/board-stm8s-discovery.h | 16 |
2 files changed, 36 insertions, 0 deletions
diff --git a/board/board-fst-01.h b/board/board-fst-01.h new file mode 100644 index 0000000..c9ec367 --- /dev/null +++ b/board/board-fst-01.h @@ -0,0 +1,20 @@ +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 6 +#define STM32_HSECLK 12000000 + +#define GPIO_USB_SET_TO_ENABLE 10 +#define GPIO_LED_SET_TO_EMIT 0 + +#define VAL_GPIO_ODR 0xFFFFE7FD +#define VAL_GPIO_CRL 0xBBB38888 /* PA7...PA0 */ +#define VAL_GPIO_CRH 0x88811388 /* PA15...PA8 */ + +#define VAL_GPIO_LED_ODR 0xFFFFFFFF +#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_APB2ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN) +#define RCC_APB2RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPBRST) diff --git a/board/board-stm8s-discovery.h b/board/board-stm8s-discovery.h new file mode 100644 index 0000000..6be488a --- /dev/null +++ b/board/board-stm8s-discovery.h @@ -0,0 +1,16 @@ +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HSECLK 8000000 + +#undef GPIO_USB_CLEAR_TO_ENABLE +#define GPIO_LED_SET_TO_EMIT 8 + +#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 RCC_APB2ENR_IOP_EN (RCC_APB2ENR_IOPAEN) +#define RCC_APB2RSTR_IOP_RST (RCC_APB2RSTR_IOPARST) |