summaryrefslogtreecommitdiff
path: root/examples/device/usbtmc/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/device/usbtmc/src/main.c')
-rw-r--r--examples/device/usbtmc/src/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/device/usbtmc/src/main.c b/examples/device/usbtmc/src/main.c
index f78cce91f..b1269b117 100644
--- a/examples/device/usbtmc/src/main.c
+++ b/examples/device/usbtmc/src/main.c
@@ -29,6 +29,7 @@
#include "bsp/board_api.h"
#include "tusb.h"
+#include "main.h"
#include "usbtmc_app.h"
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
@@ -123,12 +124,12 @@ void led_blinking_task(void)
{
led_state = true;
board_led_write(true);
- start_ms = board_millis();
+ start_ms = tusb_time_millis_api();
doPulse = false;
}
else if (led_state == true)
{
- if ( board_millis() - start_ms < 750) //Spec says blink must be between 500 and 1000 ms.
+ if ( tusb_time_millis_api() - start_ms < 750) //Spec says blink must be between 500 and 1000 ms.
{
return; // not enough time
}
@@ -139,7 +140,7 @@ void led_blinking_task(void)
else
{
// Blink every interval ms
- if ( board_millis() - start_ms < blink_interval_ms) return; // not enough time
+ if ( tusb_time_millis_api() - start_ms < blink_interval_ms) return; // not enough time
start_ms += blink_interval_ms;
board_led_write(led_state);