diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2015-04-18 12:28:00 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2015-04-18 12:28:00 +0900 |
commit | 18b38533f7f16074e986483cc357c310cc533a0f (patch) | |
tree | 95bfdadbb8465967fe9b7d63322d4ff6bf6f3908 | |
parent | a0f33c1036417c118496d77c98f0f7f1116df5bd (diff) | |
parent | 431e62a077576a0a6c98229c3fcab072e5bb1761 (diff) |
Merge branch 'master' of git.gniibe.org:chopstx/chopstx
Conflicts:
ChangeLog
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | board/board-maple-mini.h | 27 |
2 files changed, 31 insertions, 0 deletions
@@ -4,6 +4,10 @@ (chopstx_main_init): New. (chx_init): Use CHX_PRIO_MAIN_INIT. +2015-04-08 Niibe Yutaka <gniibe@fsij.org> + + * board/board-maple-mini.h: New from Aidan Thornton. + 2015-03-17 Niibe Yutaka <gniibe@fsij.org> * VERSION: 0.04a. diff --git a/board/board-maple-mini.h b/board/board-maple-mini.h new file mode 100644 index 0000000..92557e2 --- /dev/null +++ b/board/board-maple-mini.h @@ -0,0 +1,27 @@ +#define FLASH_PAGE_SIZE 1024 + +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HSECLK 8000000 + +#define GPIO_USB_CLEAR_TO_ENABLE 9 +#define GPIO_LED_SET_TO_EMIT 1 + +/* + * Port B setup. + * PB1 - Push pull output 50MHz (LED 1:ON 0:OFF) + * PB9 - Push pull output 50MHz (USB 1:ON 0:OFF) + * ------------------------ 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 RCC_ENR_IOP_EN (RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN) +#define RCC_RSTR_IOP_RST (RCC_APB2RSTR_IOPARST | RCC_APB2RSTR_IOPBRST) + +/* NeuG settings for ADC2 is default (PA0: Analog IN0, PA1: Analog IN1). */ |