Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shpegun60/dallas_temperature_fsm_hal


https://github.com/shpegun60/dallas_temperature_fsm_hal

dallas-temperature dma ds18b20 hal nonblocking onewire stm32 uart

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

## Nonblocking continious ds18b20 handler, one wire over uart with dma

library include autosearch for devices on one bus by collisions after initialization and checking crc

```c
#include "dallas_temperature.h"
#include "UartOneWire.h"

extern UART_HandleTypeDef huart;
UartOneWire_HandleTypeDef ow;
DallasTemperatureData dt;

uint8_t resolution = TEMP_12_BIT;

int main () {

OW_Init(&ow, &huart);
DT_SetOneWire(&dt, &ow);
DT_init(&dt, resolution);

while(1) {
uint32_t millis = HAL_GetTick();
DT_ContiniousProceed(&dt, millis);
}
}
```
for get temperature and id devices go to "DallasTemperatureData" declaration