MAX31855.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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_MAX31855
  16. #define UNITEMP_MAX31855
  17. #include "../unitemp.h"
  18. #include "../Sensors.h"
  19. #include "../interfaces/SPISensor.h"
  20. extern const SensorType MAX31855;
  21. /**
  22. * @brief Выделение памяти и установка начальных значений датчика MAX31855
  23. *
  24. * @param sensor Указатель на создаваемый датчик
  25. * @return Истина при успехе
  26. */
  27. bool unitemp_MAX31855_alloc(Sensor* sensor, char* args);
  28. /**
  29. * @brief Инициализации датчика MAX31855
  30. *
  31. * @param sensor Указатель на датчик
  32. * @return Истина если инициализация упспешная
  33. */
  34. bool unitemp_MAX31855_init(Sensor* sensor);
  35. /**
  36. * @brief Деинициализация датчика
  37. *
  38. * @param sensor Указатель на датчик
  39. */
  40. bool unitemp_MAX31855_deinit(Sensor* sensor);
  41. /**
  42. * @brief Обновление значений из датчика
  43. *
  44. * @param sensor Указатель на датчик
  45. * @return Статус обновления
  46. */
  47. UnitempStatus unitemp_MAX31855_update(Sensor* sensor);
  48. /**
  49. * @brief Высвободить память датчика
  50. *
  51. * @param sensor Указатель на датчик
  52. */
  53. bool unitemp_MAX31855_free(Sensor* sensor);
  54. #endif