osapi.h 875 B

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