sensor_tbl.h 996 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __SENSOR_TBL_H__
  2. #define __SENSOR_TBL_H__
  3. #include <stdint.h>
  4. typedef enum {
  5. NotMonitorOnStandby = 0,
  6. MonitorOnStandby = 1,
  7. }monit_sta_t;
  8. /**
  9. ** @brief HAL read/write/init function type definition
  10. ***/
  11. typedef int (*sensor_init_hndlr_t) (void);
  12. typedef int (*sensor_write_hndlr_t) (void);
  13. typedef int (*sensor_read_hndlr_t) (uint8_t *reading);
  14. /**
  15. ** @brief HAL Device Table
  16. ***/
  17. typedef struct
  18. {
  19. uint8_t sensor_number;
  20. uint8_t poweron_delay; //scan this sensor after poweron_delay seconds, when bmc power on.
  21. uint8_t reset_delay; //scan this sensor after reset_delay senconds, when cpu reset.
  22. uint8_t monitor_interval; //Monitoring this sensor every monitor_interval seconds.
  23. monit_sta_t monitor_state; //whether monitoring this sensor when standby.
  24. sensor_read_hndlr_t device_read;
  25. sensor_write_hndlr_t device_write;
  26. sensor_init_hndlr_t device_init;
  27. } sensor_tbl_t;
  28. #endif /* __SENSOR_TBL_H__ */