Explorar el Código

millis()

systick_millis_count is already volatile, doing it twice is not needed.
main
FrankBoesing hace 9 años
padre
commit
3bc1d5f9e8
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  1. +1
    -2
      teensy3/core_pins.h

+ 1
- 2
teensy3/core_pins.h Ver fichero

@@ -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);

Cargando…
Cancelar
Guardar