beep.h 704 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef __BEEP_Hx__
  2. #define __BEEP_Hx__
  3. #include "stdint.h"
  4. enum {
  5. BEEP_MODE_WARN1=0,
  6. BEEP_MODE_WARN2,
  7. BEEP_MODE_ERROR,
  8. BEEP_MODE_FAULT,
  9. BEEP_MODE_FATAL,
  10. BEEP_MODE_MAX,
  11. };
  12. typedef struct {
  13. int on_ms;
  14. int off_ms;
  15. int times;
  16. }beep_para_t;
  17. // typedef struct{
  18. // uint8_t enable;
  19. // uint32_t on;
  20. // uint32_t off;
  21. // int time;
  22. // }web_beep_t;
  23. typedef struct{
  24. uint32_t enable;
  25. uint32_t interval;
  26. uint32_t duption;
  27. }web_beep_t;
  28. int beep_init(void);
  29. int beep_deinit(void);
  30. int beep_set(int mode);
  31. int beep_set_ex(beep_para_t *para);
  32. int beep_reset(void);
  33. int beep_set_val(web_beep_t *para);
  34. int beep_get_val(web_beep_t *para);
  35. #endif