Bläddra i källkod

millis()

systick_millis_count is already volatile, doing it twice is not needed.
teensy4-core
FrankBoesing 9 år sedan
förälder
incheckning
3bc1d5f9e8
1 ändrade filer med 1 tillägg och 2 borttagningar
  1. +1
    -2
      teensy3/core_pins.h

+ 1
- 2
teensy3/core_pins.h Visa fil

@@ -1070,8 +1070,7 @@ extern volatile uint32_t systick_millis_count;
static inline uint32_t millis(void) __attribute__((always_inline, unused));
static inline uint32_t millis(void)
{
volatile uint32_t ret = systick_millis_count; // single aligned 32 bit is atomic;
return ret;
return systick_millis_count; // single aligned 32 bit is atomic;
}

uint32_t micros(void);

Laddar…
Avbryt
Spara