SCD40.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. Unitemp - Universal temperature reader
  3. Copyright (C) 2022-2023 Victor Nikitchuk (https://github.com/quen0n)
  4. Contributed by divinebird (https://github.com/divinebird)
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. */
  16. #ifndef UNITEMP_SCD40
  17. #define UNITEMP_SCD40
  18. #include "../unitemp.h"
  19. #include "../Sensors.h"
  20. extern const SensorType SCD40;
  21. /**
  22. * @brief Выделение памяти и установка начальных значений датчика SCD40
  23. * @param sensor Указатель на создаваемый датчик
  24. * @return Истина при успехе
  25. */
  26. bool unitemp_SCD40_alloc(Sensor* sensor, char* args);
  27. /**
  28. * @brief Инициализации датчика SCD40
  29. * @param sensor Указатель на датчик
  30. * @return Истина если инициализация упспешная
  31. */
  32. bool unitemp_SCD40_init(Sensor* sensor);
  33. /**
  34. * @brief Деинициализация датчика
  35. * @param sensor Указатель на датчик
  36. */
  37. bool unitemp_SCD40_deinit(Sensor* sensor);
  38. /**
  39. * @brief Обновление значений из датчика
  40. * @param sensor Указатель на датчик
  41. * @return Статус опроса датчика
  42. */
  43. UnitempStatus unitemp_SCD40_update(Sensor* sensor);
  44. /**
  45. * @brief Высвободить память датчика
  46. * @param sensor Указатель на датчик
  47. */
  48. bool unitemp_SCD40_free(Sensor* sensor);
  49. #endif