time.h 858 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include <stdint.h>
  3. void busyWaitDuring_initMode (INIT_MODE_ const uint32_t inDelayMS);
  4. void busyWaitDuring (USER_MODE_ const uint32_t inDelayMS);
  5. void busyWaitUntil (USER_MODE_ const uint32_t inDeadLineMS);
  6. // Prevent default SysTick interruption code generation
  7. //$interrupt-section SysTick
  8. void systickInterruptServiceRoutine (SECTION_MODE) asm ("interrupt.section.SysTick");
  9. uint32_t millis(ANY_MODE);
  10. //$section fonction.micros
  11. uint64_t micros (USER_MODE) asm ("fonction.micros") ;
  12. uint64_t section_micros (SECTION_MODE) asm ("section.fonction.micros") ;
  13. uint32_t systick(ANY_MODE);
  14. #define MACRO_REAL_TIME_ISR(ROUTINE) \
  15. static void (* UNIQUE_IDENTIFIER) (SECTION_MODE_ const uint32_t inUptime) \
  16. __attribute__ ((section ("real.time.interrupt.routine.array"))) \
  17. __attribute__ ((unused)) \
  18. __attribute__ ((used)) = ROUTINE ;