38 #ifndef SIMPLE_HAL_H__ 39 #define SIMPLE_HAL_H__ 53 #define HAL_BUTTON_PRESS_FREQUENCY HAL_MS_TO_RTC_TICKS(400) 56 #define HAL_LED_BLINK_PERIOD_MIN_MS (20) 59 #define LED_MASK_STATE_OFF (false) 61 #define LED_MASK_STATE_ON (true) 65 #define BUTTON_BOARD (defined(BOARD_PCA10040) || defined(BOARD_PCA10028) || defined(BOARD_PCA10056) || defined(BOARD_PCA10100)) //lint -e491 // Suppress "non-standard use of 'defined' preprocessor operator" 124 void hal_led_blink_ms(uint32_t pin_mask, uint32_t delay_ms, uint32_t blink_count);
void hal_led_pin_set(uint32_t pin, bool value)
Sets the LED for the given PIN.
void hal_led_blink_stop(void)
Stops blinking the LEDs (previously started by hal_led_blink_ms).
uint32_t hal_buttons_init(hal_button_handler_cb_t cb)
Initializes the buttons on a DK.
void(* hal_button_handler_cb_t)(uint32_t button_number)
Button event handler callback type.
void hal_led_blink_ms(uint32_t pin_mask, uint32_t delay_ms, uint32_t blink_count)
Blinks (one toggle cycle) pin_mask a specified number of times.
bool hal_led_pin_get(uint32_t pin)
Gets the current state of a (LED) pin.
void hal_led_mask_set(uint32_t led_mask, bool value)
Sets the LEDs for the given mask.
void hal_leds_init(void)
Initializes the LEDs.