osapi.h 942 B

123456789101112131415161718192021222324252627282930
  1. #ifndef _SDK_OVERRIDE_OSAPI_H_
  2. #define _SDK_OVERRIDE_OSAPI_H_
  3. #include "rom.h"
  4. void ets_timer_arm_new (ETSTimer *a, int b, int c, int isMstimer);
  5. int atoi(const char *nptr);
  6. int os_printf(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
  7. int os_printf_plus(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
  8. unsigned int uart_baudrate_detect(unsigned int uart_no, unsigned int async);
  9. void NmiTimSetFunc(void (*func)(void));
  10. void call_user_start(void);
  11. #include_next "osapi.h"
  12. #ifdef ENABLE_TIMER_SUSPEND
  13. extern void swtmr_register(void* timer_ptr);
  14. #undef os_timer_arm
  15. #define os_timer_arm(timer_ptr, duration, mode) do{swtmr_register(timer_ptr); \
  16. ets_timer_arm_new(timer_ptr, duration, mode, 1);}while(0);
  17. extern void swtmr_unregister(void* timer_ptr);
  18. #undef os_timer_disarm
  19. #define os_timer_disarm(timer_ptr) do{swtmr_unregister(timer_ptr); ets_timer_disarm(timer_ptr);}while(0);
  20. #endif
  21. #endif