gc0308.h 509 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "sensor.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /**
  7. * @brief Detect sensor pid
  8. *
  9. * @param slv_addr SCCB address
  10. * @param id Detection result
  11. * @return
  12. * 0: Can't detect this sensor
  13. * Nonzero: This sensor has been detected
  14. */
  15. int gc0308_detect(int slv_addr, sensor_id_t *id);
  16. /**
  17. * @brief initialize sensor function pointers
  18. *
  19. * @param sensor pointer of sensor
  20. * @return
  21. * Always 0
  22. */
  23. int gc0308_init(sensor_t *sensor);
  24. #ifdef __cplusplus
  25. }
  26. #endif