Browse Source

boards/nucleo144-f207: adapt to common nucleo144 code

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

4
boards/nucleo144-f207/Makefile.features

@ -8,8 +8,8 @@ FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
# load the common Makefile.features for Nucleo boards
include $(RIOTBOARD)/nucleo-common/Makefile.features
# load the common Makefile.features for Nucleo-144 boards
include $(RIOTBOARD)/nucleo144-common/Makefile.features
# The board MPU family (used for grouping by the CI system)
FEATURES_MCU_GROUP = cortex_m3_2

4
boards/nucleo144-f207/Makefile.include

@ -2,5 +2,5 @@
export CPU = stm32f2
export CPU_MODEL = stm32f207zg
# 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-f207/include/board.h

@ -22,43 +22,12 @@
#ifndef BOARD_H
#define BOARD_H
#include "board_common.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @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