Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/shpegun60/dallas_temperature_fsm_hal
- Owner: shpegun60
- Created: 2021-12-19T20:44:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-19T23:46:30.000Z (about 3 years ago)
- Last Synced: 2023-09-13T07:45:55.403Z (over 1 year ago)
- Topics: dallas-temperature, dma, ds18b20, hal, nonblocking, onewire, stm32, uart
- Language: C
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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