![]() |
ARMEBS4
revision-26.06.2015
|
Support for common devices (buttons, leds, ...) More...
![]() |
Files | |
file | bsp_armebs4.h |
BSP for ARMEBS4. | |
file | bsp_armebs4_eth.h |
BSP for ARMEBS4 Ethernet. | |
file | bsp_envirobot_sc.h |
BSP for Envirobot Sensor Control. | |
file | bsp_stm32f4_discovery.h |
BSP for stm32f4 discovery. | |
file | bsp_stm32f4_discovery.h |
BSP for stm32f4 discovery. | |
file | bsp_stm32f4_geval.h |
BSP for stm3240 g-eval board. | |
Functions | |
status_e | bsp_init (void) |
Initialize the whole board. More... | |
void | bsp_led_set (uint32_t nr, uint32_t value) |
Set a led (ON or OFF) More... | |
uint32_t | bsp_button_get (uint32_t nr) |
Get a button. More... | |
uint32_t | bsp_button_get_all (void) |
Get all buttons. More... | |
const struct gpio_t * | bsp_button_gpios (void) |
get buttons gpios More... | |
status_e | bsp_set_button_irq_handler (void(*handler)(uint32_t is, uint32_t was)) |
Set a irq handler for all button changes. More... | |
void | bsp_led_toggle (uint32_t nr) |
toggle a led More... | |
void | bsp_fatal (status_e status) |
fatal error More... | |
void | bsp_reset_reason_init (void) |
Reset reason initialization. More... | |
uint32_t | bsp_reset_reason_get (void) |
Reset reason get. More... | |
void | bsp_reset_reason_clear (void) |
Reset reason clear. More... | |
Support for common devices (buttons, leds, ...)
status_e bsp_init | ( | void | ) |
Initialize the whole board.
Definition at line 525 of file bsp_armebs4.c.
References ARRAY_SIZE, bsp_eth_powerdown(), BSP_PWM_LED_STEPS, gpio_setup(), gpio_setup_list(), NO_ERROR, and ram_test_basic().
Referenced by Reset_Handler().
void bsp_led_set | ( | uint32_t | nr, |
uint32_t | value | ||
) |
Set a led (ON or OFF)
nr | the led number |
value | 0 for OFF, anything else : ON |
Definition at line 244 of file bsp_armebs4.c.
References BSP_PWM_LED_STEPS.
uint32_t bsp_button_get | ( | uint32_t | nr | ) |
Get a button.
nr | the button number |
Definition at line 340 of file bsp_armebs4.c.
References BSP_BUTTON_NR, and gpio_get().
Referenced by bsp_button_get_all().
uint32_t bsp_button_get_all | ( | void | ) |
Get all buttons.
Definition at line 9 of file bsp.c.
References bsp_button_get(), and BSP_BUTTON_NR.
Referenced by bsp_set_button_irq_handler().
const struct gpio_t* bsp_button_gpios | ( | void | ) |
get buttons gpios
Definition at line 350 of file bsp_armebs4.c.
Referenced by bsp_set_button_irq_handler().
status_e bsp_set_button_irq_handler | ( | void(*)(uint32_t is, uint32_t was) | handler | ) |
Set a irq handler for all button changes.
handler | The handler for button changed with those parameters is : the current value, was, the value of the last call |
Definition at line 34 of file bsp.c.
References bsp_button_get_all(), bsp_button_gpios(), BSP_BUTTON_NR, ERROR_BAD_PARAM, GPIO_IRQ_MODE_EDGE_BOTH, gpio_irq_setup(), and NO_ERROR.
void bsp_led_toggle | ( | uint32_t | nr | ) |
toggle a led
nr | the led number |
Definition at line 249 of file bsp_armebs4.c.
References BSP_PWM_LED_STEPS, TIM_TypeDef::CCR1, and gpio_t::nr.
void bsp_fatal | ( | status_e | status | ) |
fatal error
status | The status of the fatal error |
This function will halt the CPU if a debugger is connected.
Definition at line 123 of file bsp.c.
References breakpoint, and debugger_is_connected.
Referenced by _sbrk(), HardFaultHelper(), and Reset_Handler().
void bsp_reset_reason_init | ( | void | ) |
Reset reason initialization.
Save the reset reason, called from startup code
Definition at line 175 of file bsp.c.
Referenced by Reset_Handler().
uint32_t bsp_reset_reason_get | ( | void | ) |
Reset reason get.
This value has been saved by bsp_reset_reason_init from startup code
Definition at line 180 of file bsp.c.
Referenced by Reset_Handler().
void bsp_reset_reason_clear | ( | void | ) |
Reset reason clear.
Clear the reset reason value from RCC->CSR
Definition at line 185 of file bsp.c.
Referenced by Reset_Handler().