Files
DS18B20_Library/Core/PY32Module/PY32module_main.h

37 lines
1.4 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
******************************************************************************
* @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