7 static void (*user_handler)(uint32_t is, uint32_t was);
22 static uint32_t buttons_handler(
const struct gpio_t *gpio)
28 user_handler(is, was);
43 user_handler = handler;
60 static void set_all_leds(uint32_t enable)
74 static void short_pulse(
void)
85 static void long_pulse(
void)
96 static __attribute__ ((noreturn))
122 __attribute__ ((weak, noreturn))
128 __disable_fault_irq();
149 __attribute__ ((weak, noreturn))
150 void _exit(
int status)
173 static uint32_t rcc_csr_at_boot = 0;
177 rcc_csr_at_boot = RCC->CSR;
182 return rcc_csr_at_boot;
187 RCC->CSR |= RCC_CSR_RMVF;
This file contains all the functions prototypes for the RCC firmware library.
BSP - Board Support Package.
void delay_wait_ms(uint32_t ms)
Wait for at least that time.
void bsp_reset_reason_clear(void)
Reset reason clear.
#define BSP_BUTTON_NR
Number of buttons.
#define breakpoint()
Breakpoint (from code)
void bsp_fatal(status_e status)
fatal error
status_e gpio_irq_setup(const struct gpio_t *gpio, uint32_t(*handler)(const struct gpio_t *gpio), enum gpio_irq_mode_e mode, uint32_t prio)
Setup interrupt on GPIO.
void bsp_led_set(uint32_t nr, uint32_t value)
Set a led (ON or OFF)
status_e bsp_set_button_irq_handler(void(*handler)(uint32_t is, uint32_t was))
Set a irq handler for all button changes.
uint32_t bsp_reset_reason_get(void)
Reset reason get.
uint32_t bsp_button_get_all(void)
Get all buttons.
void bsp_reset_reason_init(void)
Reset reason initialization.
#define debugger_is_connected()
Detect is debugger is connected.
#define BSP_LED_NR
Number of LEDs.
const struct gpio_t * bsp_button_gpios(void)
get buttons gpios
main has finished (shouldn't happen in embedded software)
uint32_t bsp_button_get(uint32_t nr)
Get a button.