Contiki 2.6
|
ST board abstraction layer. More...
Data Structures | |
struct | LedResourceStruct |
Data structure for led description. More... | |
struct | ButtonResourceStruct |
Data structure for button description. More... | |
struct | MemsResourceStruct |
Data structure for MEMS description. More... | |
struct | TempSensorResourceStruct |
Data structure for temperature sensor description. More... | |
struct | BoardIOStruct |
Data structure for board user I/O. More... | |
struct | BoardResourcesStruct |
Data structure describing board features. More... | |
Defines | |
#define | LEDS_MB851A 2 |
Define the number of LEDs in the specific board revision. | |
#define | LEDS_MB851B 2 |
Define the number of LEDs in the specific board revision. | |
#define | LEDS_MB851C 2 |
Define the number of LEDs in the specific board revision. | |
#define | LEDS_MB954A 2 |
Define the number of LEDs in the specific board revision. | |
#define | LEDS_MB954B 2 |
Define the number of LEDs in the specific board revision. | |
#define | LEDS_MB950A 2 |
Define the number of LEDs in the specific board revision. | |
#define | LEDS_MB951A 2 |
Define the number of LEDs in the specific board revision. | |
#define | BUTTONS_MB851A 1 |
Define the number of user buttons in the specific board revision. | |
#define | BUTTONS_MB851B 1 |
Define the number of user buttons in the specific board revision. | |
#define | BUTTONS_MB851C 1 |
Define the number of user buttons in the specific board revision. | |
#define | BUTTONS_MB954A 1 |
Define the number of user buttons in the specific board revision. | |
#define | BUTTONS_MB954B 1 |
Define the number of user buttons in the specific board revision. | |
#define | BUTTONS_MB950A 5 |
Define the number of user buttons in the specific board revision. | |
#define | BUTTONS_MB951A 1 |
Define the number of user buttons in the specific board revision. | |
#define | BOARD_HAS_MEMS (1 << 0) |
Flag to indicate if MEMS is present. | |
#define | BOARD_HAS_TEMP_SENSOR (1 << 1) |
Flag to indicate if temeprature sensor is present. | |
#define | BOARD_HAS_PA (1 << 2) |
Flag to indicate if external power amplifier is present. | |
#define | BOARD_HAS_EEPROM (1 << 3) |
Flag to indicate if EEPROM is present. | |
#define | BOARD_HAS_FTDI (1 << 4) |
Flag to indicate if FTDI is used as PC interface. | |
#define | BOARD_HAS_STM32F (1 << 5) |
Flag to indicate if STM32F is used as PC interface. | |
#define | BUTTON_Sn(n) (PORTx_PIN(boardDescription->io->buttons[n].gpioPort, boardDescription->io->buttons[n].gpioPin)) |
Description buttons definition. | |
#define | UART_TX PORTB_PIN(1) |
Description uart definition. | |
#define | TEMPERATURE_SENSOR_GPIO PORTx_PIN(boardDescription->temperatureSensor->gpioPort, boardDescription->temperatureSensor->gpioPin) |
Description temperature sensor GPIO. | |
Typedefs | |
typedef struct LedResourceStruct | LedResourceType |
Data structure for led description. | |
typedef struct ButtonResourceStruct | ButtonResourceType |
Data structure for button description. | |
typedef struct MemsResourceStruct | MemsResourceType |
Data structure for MEMS description. | |
typedef struct TempSensorResourceStruct | TempSensorResourceType |
Data structure for temperature sensor description. | |
typedef struct BoardIOStruct | BoardIOType |
Data structure for board user I/O. | |
typedef struct BoardResourcesStruct | BoardResourcesType |
Data structure describing board features. | |
Functions | |
BoardResourcesType const * | halBoardGetDescription (void) |
Return pointer to board description structure. | |
void | halBoardInit (void) |
Initialize the board description data structure after autodetect of the boards based on the CIB Board name field content. | |
void | halBoardPowerUp (void) |
Perform board specific action to power up the system. | |
void | halBoardPowerDown (void) |
Perform board specific action to power down the system, usually before going to deep sleep. |
ST board abstraction layer.
This header defines API and data structures to handle ST boards with thei associated resources on algorithm behavior. See hal/micro/cortexm3/stm32w108/board.h for source code.
BoardResourcesType const* halBoardGetDescription | ( | void | ) |
void halBoardInit | ( | void | ) |
Initialize the board description data structure after autodetect of the boards based on the CIB Board name field content.
In case of invalid CIB data it will default to MB851A. Customer normally needs to modify this file to adapt it to their specific board.
Definition at line 250 of file board.c.
References NULL.
Referenced by halInit().
void halBoardPowerDown | ( | void | ) |
Perform board specific action to power down the system, usually before going to deep sleep.
This code depends on the actual board features and configure the stm32w and on board devices for minimal power consumption. Customer normally needs to modify this file to adapt it to their specific board.
Definition at line 284 of file board.c.
References BOARD_HAS_PA, BoardResourcesStruct::buttons, BoardIOStruct::buttons, halGpioConfig(), halGpioSet(), BoardResourcesStruct::io, BoardResourcesStruct::leds, BoardIOStruct::leds, PORTB_PIN, and PORTx_PIN.
Referenced by halPowerDown().
void halBoardPowerUp | ( | void | ) |
Perform board specific action to power up the system.
This code depends on the actual board features and configure the stm32w and on board devices for proper operation. Customer normally needs to modify this file to adapt it to their specific board.
Definition at line 350 of file board.c.
References BOARD_HAS_EEPROM, BOARD_HAS_MEMS, BOARD_HAS_PA, BOARD_HAS_TEMP_SENSOR, BoardResourcesStruct::buttons, BoardIOStruct::buttons, TempSensorResourceStruct::gpioPin, TempSensorResourceStruct::gpioPort, halGpioConfig(), halGpioSet(), BoardResourcesStruct::io, BoardResourcesStruct::leds, BoardIOStruct::leds, PORTA_PIN, PORTB_PIN, PORTC_PIN, PORTx_PIN, and BoardResourcesStruct::temperatureSensor.
Referenced by halPowerUp().