Didn't realise DS18B20 was 1-Wire Will probably just find a library for that one - can't be arsed doing more bit banging
13 lines
267 B
C
13 lines
267 B
C
#include "ds18b20.h"
|
|
#include "driver/gpio.h"
|
|
#include "sdkconfig.h"
|
|
|
|
#ifdef CONFIG_DS18B20_ENABLED
|
|
|
|
int ds18b20_read(void) {
|
|
esp_err_t ret = gpio_set_pull_mode(CONFIG_DS18B20_GPIO_PIN, GPIO_PULLUP_ONLY);
|
|
return DS18B20_OK;
|
|
}
|
|
|
|
#endif /* CONFIG_DS18B20_ENABLED */
|