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

View File

@@ -63,7 +63,7 @@ int main(void)
board_init();
print_greeting();
//tusb_init();
tusb_init();
while (1)
{
@@ -114,7 +114,7 @@ void led_blinking_task(void)
{
enum { BLINK_INTEVAL = 1000 };
static uint32_t led_on_mask = 0;
static bool led_state = false;
static uint32_t last_blink = 0;
// not enough time
@@ -122,8 +122,8 @@ void led_blinking_task(void)
last_blink += BLINK_INTEVAL;
board_leds(led_on_mask, 1 - led_on_mask);
led_on_mask = 1 - led_on_mask; // toggle
board_led_control(BOARD_LED0, led_state);
led_state = 1 - led_state; // toggle
}
//--------------------------------------------------------------------+