37 lines
1.4 KiB
C
37 lines
1.4 KiB
C
/**
|
||
******************************************************************************
|
||
* @file pch_sensors.h
|
||
* @brief Работа с датчиками температуры DS18B20 в ПЧ
|
||
******************************************************************************
|
||
*****************************************************************************/
|
||
|
||
#ifndef MODULE_MAIN_H
|
||
#define MODULE_MAIN_H
|
||
|
||
/* Includes -----------------------------------------------------------------*/
|
||
#include "main.h"
|
||
#include "pch_sensors.h"
|
||
#include "modbus_data.h"
|
||
|
||
/* Declarations and definitions ---------------------------------------------*/
|
||
typedef enum
|
||
{
|
||
STATUS_OK = 0x01,
|
||
STATUS_SCAN_END = 0x11,
|
||
STATUS_ERR_READ_LOCATION = 0xF0,
|
||
STATUS_ERR_READ_ROM = 0x0F,
|
||
STATUS_ERR_INIT = 0xAA,
|
||
STATUS_ERR_DEINIT = 0x55,
|
||
STATUS_ERR_SCAN = 0xBB,
|
||
}Sensor_ResponseStatusTypeDef;
|
||
|
||
/* Functions ---------------------------------------------------------------*/
|
||
void PYModule_main(void);
|
||
void PYModule_FirstInit(void);
|
||
void PYModule_ScanSensor(PCHSens_DallasBusHandle *hbus);
|
||
void PYModule_ReadSensor(DALLAS_HandleTypeDef *hdallas, PCHSens_TypeDef *pchsens);
|
||
void PYModule_InitSensor(PCHSens_TypeDef *pchsens);
|
||
void PYModule_DeInitSensor(PCHSens_TypeDef *pchsens);
|
||
void PYModule_CheckLosted(PCHSens_TypeDef *pchsens);
|
||
void PYModule_StoreModbus(PCHSens_TypeDef *pchsens);
|
||
#endif // #ifndef MODULE_MAIN_H
|