get freertos build
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#define _TUSB_TIMEOUT_TTIMER_H_
|
||||
|
||||
#include "tusb_compiler.h"
|
||||
#include "tusb_hal.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -58,12 +59,12 @@ typedef struct {
|
||||
static inline void timeout_set(timeout_timer_t* tt, uint32_t msec)
|
||||
{
|
||||
tt->interval = msec;
|
||||
tt->start = osal_millis();
|
||||
tt->start = tusb_hal_millis();
|
||||
}
|
||||
|
||||
static inline bool timeout_expired(timeout_timer_t* tt)
|
||||
{
|
||||
return ( osal_millis() - tt->start ) >= tt->interval;
|
||||
return ( tusb_hal_millis() - tt->start ) >= tt->interval;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -71,13 +71,13 @@
|
||||
// Halt CPU (breakpoint) when hitting error, only apply for Cortex M3, M4, M7
|
||||
#if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)
|
||||
|
||||
// Cortex M CoreDebug->DHCSR
|
||||
#define ARM_CM_DHCSR (*((volatile uint32_t*) 0xE000EDF0UL))
|
||||
|
||||
static inline void verify_breakpoint(void)
|
||||
{
|
||||
// Cortex M CoreDebug->DHCSR
|
||||
volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL);
|
||||
|
||||
// Only halt mcu if debugger is attached
|
||||
if ( ARM_CM_DHCSR & 1UL ) __asm("BKPT #0\n");
|
||||
if ( (*ARM_CM_DHCSR) & 1UL ) __asm("BKPT #0\n");
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user