diff options
| author | hathach <[email protected]> | 2019-03-13 23:14:48 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-13 23:14:48 +0700 |
| commit | eda56769b9126460f7721a9b3f04d4e4f6efd60d (patch) | |
| tree | 7a1d6bdde8db8af92b9e16583982eabbf0eff43e /hw | |
| parent | 195a44172a964b377330bc7f269b611bb920fdc7 (diff) | |
dcd_set_address include status response, usbd control stall both control in and out
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/mcb1800/board_mcb1800.c | 23 | ||||
| -rw-r--r-- | hw/bsp/readme.md | 10 |
2 files changed, 22 insertions, 11 deletions
diff --git a/hw/bsp/mcb1800/board_mcb1800.c b/hw/bsp/mcb1800/board_mcb1800.c index a321ffe61..e76b19a9f 100644 --- a/hw/bsp/mcb1800/board_mcb1800.c +++ b/hw/bsp/mcb1800/board_mcb1800.c @@ -88,14 +88,14 @@ static const PINMUX_GRP_T pinclockmuxing[] = // Invoked by startup code void SystemInit(void) { - /* Setup system level pin muxing */ - Chip_SCU_SetPinMuxing(pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T)); + /* Setup system level pin muxing */ + Chip_SCU_SetPinMuxing(pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T)); - /* Clock pins only, group field not used */ - for (int i = 0; i < (sizeof(pinclockmuxing) / sizeof(pinclockmuxing[0])); i++) - { - Chip_SCU_ClockPinMuxSet(pinclockmuxing[i].pinnum, pinclockmuxing[i].modefunc); - } + /* Clock pins only, group field not used */ + for (uint32_t i = 0; i < (sizeof(pinclockmuxing) / sizeof(pinclockmuxing[0])); i++) + { + Chip_SCU_ClockPinMuxSet(pinclockmuxing[i].pinnum, pinclockmuxing[i].modefunc); + } Chip_SetupXtalClocking(); } @@ -115,7 +115,7 @@ void board_init(void) const uint8_t ledports[] = {6, 6, 6, 6, 6, 4, 4, 4}; const uint8_t ledbits[] = {24, 25, 26, 27, 28, 12, 13, 14}; - for (int i = 0; i < (sizeof(ledports) / sizeof(ledports[0])); i++) + for (uint32_t i = 0; i < (sizeof(ledports) / sizeof(ledports[0])); i++) { Chip_GPIO_SetPinDIROutput(LPC_GPIO_PORT, ledports[i], ledbits[i]); Chip_GPIO_SetPinState(LPC_GPIO_PORT, LED_PORT, LED_PIN, false); @@ -197,10 +197,14 @@ void board_led_control(bool state) } //------------- Buttons -------------// +/* static bool button_read(uint8_t id) { + (void) id; // return !TU_BIT_TEST( GPIO_ReadValue(buttons[id].gpio_port), buttons[id].gpio_pin ); // button is active low + return false; } +*/ uint32_t board_buttons(void) { @@ -216,9 +220,12 @@ uint32_t board_buttons(void) uint8_t board_uart_getchar(void) { //return UART_ReceiveByte(BOARD_UART_PORT); + return 0; } + void board_uart_putchar(uint8_t c) { + (void) c; //UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING); } diff --git a/hw/bsp/readme.md b/hw/bsp/readme.md index b4105046f..03cd9e08e 100644 --- a/hw/bsp/readme.md +++ b/hw/bsp/readme.md @@ -4,7 +4,11 @@ This code base already had supported for a handful of following boards -### NXP MCU ### +### Nordic nRF5x ### + +- [nRF52840-DK (aka pca10056)](https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52840-DK) + +### NXP LPC ### - [LPCXpresso 11U68](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc11u68:OM13058) - [LPCXpresso 1347](https://www.nxp.com/support/developer-resources/evaluation-and-development-boards/lpcxpresso-boards/lpcxpresso-board-for-lpc1347:OM13045) @@ -18,9 +22,9 @@ This code base already had supported for a handful of following boards - [Adafruit Metro M0 Express](https://www.adafruit.com/product/3505) - [Adafruit Metro M4 Express](https://www.adafruit.com/product/3382) -### Nordic nRF52840 ### +### ST STM32 ### -- [nRF52840-DK (aka pca10056)](https://www.nordicsemi.com/eng/Products/nRF52840-DK) +- [STM32F4DISCOVERY](https://www.st.com/en/evaluation-tools/stm32f4discovery.html) ## Add your own board ## |
