api_device.h 405 B

12345678910111213141516171819202122232425
  1. #ifndef _API_DEVICE_H
  2. #define _API_DEVICE_H
  3. enum {
  4. DEV_SDCARD = 0,
  5. DEV_EARPHONE,
  6. DEV_LINEIN,
  7. DEV_EARIN,
  8. DEV_TOTAL_NUM = 7,
  9. };
  10. typedef struct {
  11. u8 sta;
  12. u8 online;
  13. u8 delay[DEV_TOTAL_NUM];
  14. u8 cnt[DEV_TOTAL_NUM];
  15. } dev_cb_t;
  16. void device_init(void);
  17. bool device_is_online(u8 dev_num);
  18. bool device_insert_event(u8 dev_num);
  19. bool device_remove_event(u8 dev_num);
  20. #endif