working on nrf52

This commit is contained in:
hathach
2018-03-13 16:30:53 +07:00
parent 2435abb0a8
commit ffca1f5e64
20 changed files with 186 additions and 100 deletions
+15 -20
View File
@@ -131,13 +131,21 @@
/// Initialize all required peripherals on board including uart, led, buttons etc ...
void board_init(void);
/** \brief Turns on and off leds on the board
* \param[in] on_mask Bitmask for LED's numbers is turning ON
* \param[out] off_mask Bitmask for LED's numbers is turning OFF
* \note the \a on_mask is more priority then \a off_mask, if an led's number is present on both.
* It will be turned ON.
*/
void board_leds(uint32_t on_mask, uint32_t off_mask);
#define BOARD_LED0 0
void board_led_control(uint32_t led_id, bool state);
static inline void board_led_on(uint32_t led_id)
{
board_led_control(led_id, true);
}
static inline void board_led_off(uint32_t led_id)
{
board_led_control(led_id, false);
}
/** \brief Get the current state of the buttons on the board
* \return Bitmask where a '1' means active (pressed), a '0' means inactive.
@@ -156,19 +164,6 @@ void board_uart_putchar(uint8_t c);
/** @} */
#if 0
//------------- Board Application -------------//
void led_blinking_task(void* param);
/// Initialize the LED blinking task application. The initial blinking rate is 1 Hert (1 per second)
void led_blinking_init(void);
/** \brief Change the blinking rate.
* \param[in] ms The interval between on and off.
*/
void led_blinking_set_interval(uint32_t ms);
#endif
#ifdef __cplusplus
}
#endif