Обновлена библиотека для датчиков с py32 модуля
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#define DS_GPIO_Port GPIOA
|
||||
|
||||
/* Data Structure ------------------------------------------------------------*/
|
||||
#define DS18B20_DEVICE_AMOUNT 8
|
||||
#define DS18B20_DEVICE_AMOUNT 30
|
||||
|
||||
/* Register ------------------------------------------------------------------*/
|
||||
#define DS18B20_CMD_CONVERT 0x44
|
||||
@@ -77,9 +77,6 @@ typedef enum {
|
||||
typedef struct
|
||||
{
|
||||
uint8_t DevAddr[DS18B20_DEVICE_AMOUNT][8];
|
||||
uint8_t AlmAddr[DS18B20_DEVICE_AMOUNT][8];
|
||||
float Temperature[DS18B20_DEVICE_AMOUNT];
|
||||
DS18B20_Res_t Resolution;
|
||||
} DS18B20_Drv_t;
|
||||
extern DS18B20_Drv_t DS;
|
||||
extern OneWire_t OW;
|
||||
@@ -91,6 +88,7 @@ HAL_StatusTypeDef DS18B20_StartConvTAll(OneWire_t* OW);
|
||||
HAL_StatusTypeDef DS18B20_CalcTemperature(OneWire_t* OW, uint8_t *ROM, uint8_t *Scratchpad, float *destination);
|
||||
HAL_StatusTypeDef DS18B20_ReadScratchpad(OneWire_t* OW, uint8_t *ROM, uint8_t *Scratchpad);
|
||||
HAL_StatusTypeDef DS18B20_WaitForEndConvertion(OneWire_t* OW);
|
||||
HAL_StatusTypeDef DS18B20_WaitForEndConvertion_NonBlocking(OneWire_t* OW);
|
||||
HAL_StatusTypeDef DS18B20_SetTempAlarm(OneWire_t* OW, uint8_t *ROM, int8_t Low,
|
||||
int8_t High);
|
||||
HAL_StatusTypeDef DS18B20_WriteUserBytes(OneWire_t* OW, uint8_t *ROM, int16_t UserBytes12,
|
||||
|
||||
Reference in New Issue
Block a user