LM75.h 2.0 KB

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