Browse Source

boards/nucleo144-f413: adapt to common nucleo144 code

pr/rotary
Alexandre Abadie 6 years ago
parent
commit
62ccabc81a
  1. 2
      boards/nucleo144-f413/Makefile.features
  2. 4
      boards/nucleo144-f413/Makefile.include
  3. 35
      boards/nucleo144-f413/include/board.h

2
boards/nucleo144-f413/Makefile.features

@ -9,7 +9,7 @@ FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_pwm
# load the common Makefile.features for Nucleo boards
include $(RIOTBOARD)/nucleo-common/Makefile.features
include $(RIOTBOARD)/nucleo144-common/Makefile.features
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = cortex_m4_3

4
boards/nucleo144-f413/Makefile.include

@ -2,5 +2,5 @@
export CPU = stm32f4
export CPU_MODEL = stm32f413zh
# load the common Makefile.include for Nucleo boards
include $(RIOTBOARD)/nucleo-common/Makefile.include
# load the common Makefile.include for Nucleo-144 boards
include $(RIOTBOARD)/nucleo144-common/Makefile.include

35
boards/nucleo144-f413/include/board.h

@ -23,6 +23,8 @@
#ifndef BOARD_H
#define BOARD_H
#include "board_common.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -37,39 +39,6 @@ extern "C" {
#define XTIMER_BACKOFF (5)
/** @} */
/**
* @brief LED pin definitions and handlers
* @{
*/
#define LED0_PIN GPIO_PIN(PORT_B, 0)
#define LED0_MASK (1 << 0)
#define LED0_ON (GPIOB->BSRR = LED0_MASK)
#define LED0_OFF (GPIOB->BSRR = (LED0_MASK << 16))
#define LED0_TOGGLE (GPIOB->ODR ^= LED0_MASK)
#define LED1_PIN GPIO_PIN(PORT_B, 7)
#define LED1_MASK (1 << 7)
#define LED1_ON (GPIOB->BSRR = LED1_MASK)
#define LED1_OFF (GPIOB->BSRR = (LED1_MASK << 16))
#define LED1_TOGGLE (GPIOB->ODR ^= LED1_MASK)
#define LED2_PIN GPIO_PIN(PORT_B, 14)
#define LED2_MASK (1 << 14)
#define LED2_ON (GPIOB->BSRR = LED2_MASK)
#define LED2_OFF (GPIOB->BSRR = (LED2_MASK << 16))
#define LED2_TOGGLE (GPIOB->ODR ^= LED2_MASK)
/** @} */
/**
* @brief User button
*/
#define BTN_B1_PIN GPIO_PIN(PORT_C, 13)
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
*/
void board_init(void);
#ifdef __cplusplus
}
#endif

Loading…
Cancel
Save