From 97dfb13b74d19f9afb959841e4baea9200ff78d4 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 11 Oct 2024 18:01:48 +0200 Subject: [PATCH 1/5] working temp sensor --- embadet/components/README.md | 31 ++ embadet/components/ds18b20/component.mk | 18 +- embadet/components/ds18b20/ds18b20.c | 296 ++++-------- embadet/components/ds18b20/ds18b20.h | 234 ++++----- embadet/components/onewire/LICENSE | 31 -- embadet/components/onewire/README.md | 14 - embadet/components/onewire/component.mk | 13 +- embadet/components/onewire/onewire.c | 602 +++++++----------------- embadet/components/onewire/onewire.h | 316 ++++--------- embadet/main/apple.c | 64 +-- 10 files changed, 503 insertions(+), 1116 deletions(-) create mode 100644 embadet/components/README.md mode change 100644 => 100755 embadet/components/ds18b20/component.mk mode change 100644 => 100755 embadet/components/ds18b20/ds18b20.c mode change 100644 => 100755 embadet/components/ds18b20/ds18b20.h delete mode 100644 embadet/components/onewire/LICENSE delete mode 100644 embadet/components/onewire/README.md mode change 100644 => 100755 embadet/components/onewire/component.mk mode change 100644 => 100755 embadet/components/onewire/onewire.c mode change 100644 => 100755 embadet/components/onewire/onewire.h diff --git a/embadet/components/README.md b/embadet/components/README.md new file mode 100644 index 0000000..1af318f --- /dev/null +++ b/embadet/components/README.md @@ -0,0 +1,31 @@ +# DS18B20 Component +Simple DS18B20 temperature sensor library for [ESP8266 RTOS SDK](https://github.com/espressif/ESP8266_RTOS_SDK) for reading Celsius temperature with different resolutions from singular device. + +## Usage +``` +// Create variable for handler +ds18b20_handler_t sensor; + +// Check for any initialization failures +if (!ds18b20_init(&sensor, GPIO_NUM_12, TEMP_RES_12_BIT)) +{ + ESP_LOGE("TAG", "Failed to initalize DS18B20!"); + + return 0; // Exit +} + +float temp = 0; + +// Initalize conversion +ds18b20_convert_temp(&sensor); + +// If you doesn't convert temperature you may read 85.0 Celsius, +// as it is default temperature set by DS18B20 if convert command wasn't issued. +temp = ds18b20_read_temp(&sensor); // Read temperature + +// Print temperature with 4 decimal places +// (12 bit resolution measurement accuracy is 0.0625 Celsius) +ESP_LOGI("TAG", "Temperature = %.4f", temp); +``` + +> **_NOTE:_** If last statement doesn't print temperature you may have to disable Newlib nano in `menuconfig` of RTOS SDK. \ No newline at end of file diff --git a/embadet/components/ds18b20/component.mk b/embadet/components/ds18b20/component.mk old mode 100644 new mode 100755 index 2bffda5..f941c9f --- a/embadet/components/ds18b20/component.mk +++ b/embadet/components/ds18b20/component.mk @@ -1,15 +1,5 @@ -# Component makefile for extras/ds18b20 +# +# Component Makefile +# -# expected anyone using bmp driver includes it as 'ds18b20/ds18b20.h' -INC_DIRS += $(ds18b20_ROOT).. - -# args for passing into compile rule generation -ds18b20_SRC_DIR = $(ds18b20_ROOT) - -# users can override this setting and get console debug output -DS18B20_DEBUG ?= 0 -ifeq ($(DS18B20_DEBUG),1) - ds18b20_CFLAGS = $(CFLAGS) -DDS18B20_DEBUG -endif - -$(eval $(call component_compile_rules,ds18b20)) +COMPONENT_ADD_INCLUDEDIRS := . \ No newline at end of file diff --git a/embadet/components/ds18b20/ds18b20.c b/embadet/components/ds18b20/ds18b20.c old mode 100644 new mode 100755 index 0779a70..9ae31eb --- a/embadet/components/ds18b20/ds18b20.c +++ b/embadet/components/ds18b20/ds18b20.c @@ -1,244 +1,120 @@ -#include "FreeRTOS.h" -#include "task.h" -#include "math.h" - - #include "ds18b20.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "esp_log.h" -#define DS18B20_WRITE_SCRATCHPAD 0x4E -#define DS18B20_READ_SCRATCHPAD 0xBE -#define DS18B20_COPY_SCRATCHPAD 0x48 -#define DS18B20_READ_EEPROM 0xB8 -#define DS18B20_READ_PWRSUPPLY 0xB4 -#define DS18B20_SEARCHROM 0xF0 -#define DS18B20_SKIP_ROM 0xCC -#define DS18B20_READROM 0x33 -#define DS18B20_MATCHROM 0x55 -#define DS18B20_ALARMSEARCH 0xEC -#define DS18B20_CONVERT_T 0x44 +static const char* TAG_DS18B20 = "DS18B20"; +static const uint16_t ds18b20_temp_conv_time[] = {94, 188, 375, 750}; // ms +static const uint16_t ds18b20_resolution_val[] = {0x1F, 0x3F, 0x5F, 0x7F}; -#define os_sleep_ms(x) vTaskDelay(((x) + portTICK_PERIOD_MS - 1) / portTICK_PERIOD_MS) +uint8_t ds18b20_init(ds18b20_handler_t *device, gpio_num_t pin, ds18b20_temp_res_t resolution) +{ + if (!device) + { + ESP_LOGW(TAG_DS18B20, "device is null!"); -#define DS18B20_FAMILY_ID 0x28 -#define DS18S20_FAMILY_ID 0x10 - -#ifdef DS18B20_DEBUG -#define debug(fmt, ...) printf("%s" fmt "\n", "DS18B20: ", ## __VA_ARGS__); -#else -#define debug(fmt, ...) -#endif - -uint8_t ds18b20_read_all(uint8_t pin, ds_sensor_t *result) { - onewire_addr_t addr; - onewire_search_t search; - uint8_t sensor_id = 0; - - onewire_search_start(&search); - - while ((addr = onewire_search_next(&search, pin)) != ONEWIRE_NONE) { - uint8_t crc = onewire_crc8((uint8_t *)&addr, 7); - if (crc != (addr >> 56)){ - debug("CRC check failed: %02X %02X\n", (unsigned)(addr >> 56), crc); - return 0; - } - - onewire_reset(pin); - onewire_select(pin, addr); - onewire_write(pin, DS18B20_CONVERT_T); - - onewire_power(pin); - vTaskDelay(750 / portTICK_PERIOD_MS); - - onewire_reset(pin); - onewire_select(pin, addr); - onewire_write(pin, DS18B20_READ_SCRATCHPAD); - - uint8_t get[10]; - - for (int k=0;k<9;k++){ - get[k]=onewire_read(pin); - } - - //debug("\n ScratchPAD DATA = %X %X %X %X %X %X %X %X %X\n",get[8],get[7],get[6],get[5],get[4],get[3],get[2],get[1],get[0]); - crc = onewire_crc8(get, 8); - - if (crc != get[8]){ - debug("CRC check failed: %02X %02X\n", get[8], crc); - return 0; - } - - uint8_t temp_msb = get[1]; // Sign byte + lsbit - uint8_t temp_lsb = get[0]; // Temp data plus lsb - uint16_t temp = temp_msb << 8 | temp_lsb; - - float temperature; - - temperature = (temp * 625.0)/10000; - //debug("Got a DS18B20 Reading: %d.%02d\n", (int)temperature, (int)(temperature - (int)temperature) * 100); - result[sensor_id].id = sensor_id; - result[sensor_id].value = temperature; - sensor_id++; - } - return sensor_id; -} - -float ds18b20_read_single(uint8_t pin) { - - onewire_reset(pin); - onewire_skip_rom(pin); - onewire_write(pin, DS18B20_CONVERT_T); - - onewire_power(pin); - vTaskDelay(750 / portTICK_PERIOD_MS); - - onewire_reset(pin); - onewire_skip_rom(pin); - onewire_write(pin, DS18B20_READ_SCRATCHPAD); - - uint8_t get[10]; - - for (int k=0;k<9;k++){ - get[k]=onewire_read(pin); - } - - //debug("\n ScratchPAD DATA = %X %X %X %X %X %X %X %X %X\n",get[8],get[7],get[6],get[5],get[4],get[3],get[2],get[1],get[0]); - uint8_t crc = onewire_crc8(get, 8); - - if (crc != get[8]){ - debug("CRC check failed: %02X %02X", get[8], crc); return 0; } - uint8_t temp_msb = get[1]; // Sign byte + lsbit - uint8_t temp_lsb = get[0]; // Temp data plus lsb + if (!onewire_init(&device->bus, pin, NULL)) + { + ESP_LOGW(TAG_DS18B20, "Failed to initialize onewire bus"); - uint16_t temp = temp_msb << 8 | temp_lsb; + return 0; + } - float temperature; + device->res = resolution; - temperature = (temp * 625.0)/10000; - return temperature; - //debug("Got a DS18B20 Reading: %d.%02d\n", (int)temperature, (int)(temperature - (int)temperature) * 100); + // Configure resolution + ds18b20_write_scratchpad(device); + ds18b20_read_scratchpad(device); + + return 1; } -bool ds18b20_measure(int pin, ds18b20_addr_t addr, bool wait) { - if (!onewire_reset(pin)) { - return false; - } - if (addr == DS18B20_ANY) { - onewire_skip_rom(pin); - } else { - onewire_select(pin, addr); - } - taskENTER_CRITICAL(); - onewire_write(pin, DS18B20_CONVERT_T); - // For parasitic devices, power must be applied within 10us after issuing - // the convert command. - onewire_power(pin); - taskEXIT_CRITICAL(); +void ds18b20_send_command(ds18b20_handler_t *device, ds18b20_commands_t command) +{ + uint8_t payload = 0x0 ^ command; - if (wait) { - os_sleep_ms(750); - onewire_depower(pin); - } - - return true; + onewire_write_byte(&device->bus, payload); } -bool ds18b20_read_scratchpad(int pin, ds18b20_addr_t addr, uint8_t *buffer) { - uint8_t crc; - uint8_t expected_crc; +void ds18b20_convert_temp(ds18b20_handler_t *device) +{ + onewire_reset(&device->bus); + onewire_send_command(&device->bus, _ROM_SKIP); - if (!onewire_reset(pin)) { - return false; - } - if (addr == DS18B20_ANY) { - onewire_skip_rom(pin); - } else { - onewire_select(pin, addr); - } - onewire_write(pin, DS18B20_READ_SCRATCHPAD); + ds18b20_send_command(device, _CONVERT_T); - for (int i = 0; i < 8; i++) { - buffer[i] = onewire_read(pin); - } - crc = onewire_read(pin); - - expected_crc = onewire_crc8(buffer, 8); - if (crc != expected_crc) { - debug("CRC check failed reading scratchpad: %02x %02x %02x %02x %02x %02x %02x %02x : %02x (expected %02x)\n", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], crc, expected_crc); - return false; - } - - return true; + vTaskDelay(pdMS_TO_TICKS(ds18b20_temp_conv_time[device->res])); } -float ds18b20_read_temperature(int pin, ds18b20_addr_t addr) { - uint8_t scratchpad[8]; - int16_t temp; +void ds18b20_write_scratchpad(ds18b20_handler_t *device) +{ + onewire_reset(&device->bus); + onewire_send_command(&device->bus, _ROM_SKIP); - if (!ds18b20_read_scratchpad(pin, addr, scratchpad)) { - return NAN; - } + ds18b20_send_command(device, _SCRATCH_WRITE); - temp = scratchpad[1] << 8 | scratchpad[0]; - - float res; - if ((uint8_t)addr == DS18B20_FAMILY_ID) { - res = ((float)temp * 625.0)/10000; - } - else { - temp = ((temp & 0xfffe) << 3) + (16 - scratchpad[6]) - 4; - res = ((float)temp * 625.0)/10000 - 0.25; - } - return res; + // Th and Tl registers + onewire_write_byte(&device->bus, 0); + onewire_write_byte(&device->bus, 0); + // Resolution value + onewire_write_byte(&device->bus, ds18b20_resolution_val[device->res]); } -float ds18b20_measure_and_read(int pin, ds18b20_addr_t addr) { - if (!ds18b20_measure(pin, addr, true)) { - return NAN; - } - return ds18b20_read_temperature(pin, addr); +void ds18b20_copy_scratchpad(ds18b20_handler_t *device) +{ + onewire_reset(&device->bus); + onewire_send_command(&device->bus, _ROM_SKIP); + + ds18b20_send_command(device, _SCRATCH_COPY); } -bool ds18b20_measure_and_read_multi(int pin, ds18b20_addr_t *addr_list, int addr_count, float *result_list) { - if (!ds18b20_measure(pin, DS18B20_ANY, true)) { - for (int i=0; i < addr_count; i++) { - result_list[i] = NAN; - } - return false; +void ds18b20_read_scratchpad(ds18b20_handler_t *device) +{ + onewire_reset(&device->bus); + onewire_send_command(&device->bus, _ROM_SKIP); + + ds18b20_send_command(device, _SCRATCH_READ); + + uint8_t i; + for (i = 0; i < 9; i++) + { + device->scratchpad[i] = onewire_read_byte(&device->bus); } - return ds18b20_read_temp_multi(pin, addr_list, addr_count, result_list); } -int ds18b20_scan_devices(int pin, ds18b20_addr_t *addr_list, int addr_count) { - onewire_search_t search; - onewire_addr_t addr; - int found = 0; - - onewire_search_start(&search); - while ((addr = onewire_search_next(&search, pin)) != ONEWIRE_NONE) { - uint8_t family_id = (uint8_t)addr; - if (family_id == DS18B20_FAMILY_ID || family_id == DS18S20_FAMILY_ID) { - if (found < addr_count) { - addr_list[found] = addr; - } - found++; - } +void ds18b20_print_scratchpad(ds18b20_handler_t *device) +{ + uint8_t i; + for (i = 0; i < 9; i++) + { + printf("%x ", device->scratchpad[i]); } - return found; + + printf("\n"); } -bool ds18b20_read_temp_multi(int pin, ds18b20_addr_t *addr_list, int addr_count, float *result_list) { - bool result = true; +float ds18b20_read_temp(ds18b20_handler_t *device) +{ + ds18b20_read_scratchpad(device); - for (int i = 0; i < addr_count; i++) { - result_list[i] = ds18b20_read_temperature(pin, addr_list[i]); - if (isnan(result_list[i])) { - result = false; - } + uint8_t sign = 0x0; + uint8_t lsb = device->scratchpad[0]; + uint8_t mask = 0xFF << (TEMP_RES_12_BIT - device->res); + lsb &= mask; // Mask out last 3 bits accordingly + uint8_t msb = device->scratchpad[1]; + + sign = msb & 0x80; + int16_t temp = 0x0; + + temp = lsb + (msb << 8); + + if (sign) + { + temp = ~(-temp) + 1; // Convert signed two complement's } - return result; -} - + return temp / 16.0; +} \ No newline at end of file diff --git a/embadet/components/ds18b20/ds18b20.h b/embadet/components/ds18b20/ds18b20.h old mode 100644 new mode 100755 index afd4d14..fa21886 --- a/embadet/components/ds18b20/ds18b20.h +++ b/embadet/components/ds18b20/ds18b20.h @@ -1,157 +1,97 @@ -#ifndef DRIVER_DS18B20_H_ -#define DRIVER_DS18B20_H_ -#include +#ifndef DS18B20_H +#define DS18B20_H -#ifdef __cplusplus -extern "C" { -#endif +#include "onewire.h" -/** @file ds18b20.h - * - * Communicate with the DS18B20 family of one-wire temperature sensor ICs. - * - */ +typedef enum { + TEMP_RES_9_BIT = 0, + TEMP_RES_10_BIT = 1, + TEMP_RES_11_BIT = 2, + TEMP_RES_12_BIT = 3 +} ds18b20_temp_res_t; -typedef onewire_addr_t ds18b20_addr_t; +typedef enum { + _SCRATCH_WRITE = 0x4E, + _SCRATCH_READ = 0xBE, + _SCRATCH_COPY = 0x48, + _CONVERT_T = 0x44 +} ds18b20_commands_t; -/** An address value which can be used to indicate "any device on the bus" */ -#define DS18B20_ANY ONEWIRE_NONE - -/** Find the addresses of all DS18B20 devices on the bus. - * - * Scans the bus for all devices and places their addresses in the supplied - * array. If there are more than `addr_count` devices on the bus, only the - * first `addr_count` are recorded. - * - * @param pin The GPIO pin connected to the DS18B20 bus - * @param addr_list A pointer to an array of ds18b20_addr_t values. This - * will be populated with the addresses of the found - * devices. - * @param addr_count Number of slots in the `addr_list` array. At most this - * many addresses will be returned. - * - * @returns The number of devices found. Note that this may be less than, - * equal to, or more than `addr_count`, depending on how many DS18B20 devices - * are attached to the bus. - */ -int ds18b20_scan_devices(int pin, ds18b20_addr_t *addr_list, int addr_count); - -/** Tell one or more sensors to perform a temperature measurement and - * conversion (CONVERT_T) operation. This operation can take up to 750ms to - * complete. - * - * If `wait=true`, this routine will automatically drive the pin high for the - * necessary 750ms after issuing the command to ensure parasitically-powered - * devices have enough power to perform the conversion operation (for - * non-parasitically-powered devices, this is not necessary but does not - * hurt). If `wait=false`, this routine will drive the pin high, but will - * then return immediately. It is up to the caller to wait the requisite time - * and then depower the bus using onewire_depower() or by issuing another - * command once conversion is done. - * - * @param pin The GPIO pin connected to the DS18B20 device - * @param addr The 64-bit address of the device on the bus. This can be set - * to ::DS18B20_ANY to send the command to all devices on the bus - * at the same time. - * @param wait Whether to wait for the necessary 750ms for the DS18B20 to - * finish performing the conversion before returning to the - * caller (You will normally want to do this). - * - * @returns `true` if the command was successfully issued, or `false` on error. - */ -bool ds18b20_measure(int pin, ds18b20_addr_t addr, bool wait); - -/** Read the value from the last CONVERT_T operation. - * - * This should be called after ds18b20_measure() to fetch the result of the - * temperature measurement. - * - * @param pin The GPIO pin connected to the DS18B20 device - * @param addr The 64-bit address of the device to read. This can be set - * to ::DS18B20_ANY to read any device on the bus (but note - * that this will only work if there is exactly one device - * connected, or they will corrupt each others' transmissions) - * - * @returns The temperature in degrees Celsius, or NaN if there was an error. - */ -float ds18b20_read_temperature(int pin, ds18b20_addr_t addr); - -/** Read the value from the last CONVERT_T operation for multiple devices. - * - * This should be called after ds18b20_measure() to fetch the result of the - * temperature measurement. - * - * @param pin The GPIO pin connected to the DS18B20 bus - * @param addr_list A list of addresses for devices to read. - * @param addr_count The number of entries in `addr_list`. - * @param result_list An array of floats to hold the returned temperature - * values. It should have at least `addr_count` entries. - * - * @returns `true` if all temperatures were fetched successfully, or `false` - * if one or more had errors (the temperature for erroring devices will be - * returned as NaN). - */ -bool ds18b20_read_temp_multi(int pin, ds18b20_addr_t *addr_list, int addr_count, float *result_list); - -/** Perform a ds18b20_measure() followed by ds18b20_read_temperature() - * - * @param pin The GPIO pin connected to the DS18B20 device - * @param addr The 64-bit address of the device to read. This can be set - * to ::DS18B20_ANY to read any device on the bus (but note - * that this will only work if there is exactly one device - * connected, or they will corrupt each others' transmissions) - * - * @returns The temperature in degrees Celsius, or NaN if there was an error. - */ -float ds18b20_measure_and_read(int pin, ds18b20_addr_t addr); - -/** Perform a ds18b20_measure() followed by ds18b20_read_temp_multi() - * - * @param pin The GPIO pin connected to the DS18B20 bus - * @param addr_list A list of addresses for devices to read. - * @param addr_count The number of entries in `addr_list`. - * @param result_list An array of floats to hold the returned temperature - * values. It should have at least `addr_count` entries. - * - * @returns `true` if all temperatures were fetched successfully, or `false` - * if one or more had errors (the temperature for erroring devices will be - * returned as NaN). - */ -bool ds18b20_measure_and_read_multi(int pin, ds18b20_addr_t *addr_list, int addr_count, float *result_list); - -/** Read the scratchpad data for a particular DS18B20 device. - * - * This is not generally necessary to do directly. It is done automatically - * as part of ds18b20_read_temperature(). - * - * @param pin The GPIO pin connected to the DS18B20 device - * @param addr The 64-bit address of the device to read. This can be set - * to ::DS18B20_ANY to read any device on the bus (but note - * that this will only work if there is exactly one device - * connected, or they will corrupt each others' transmissions) - * @param buffer An 8-byte buffer to hold the read data. - * - * @returns `true` if the data was read successfully, or `false` on error. - */ -bool ds18b20_read_scratchpad(int pin, ds18b20_addr_t addr, uint8_t *buffer); - -// The following are obsolete/deprecated APIs +typedef uint8_t ds18b20_scratchpad_t[9]; typedef struct { - uint8_t id; - float value; -} ds_sensor_t; + onewire_bus_handle_t bus; + ds18b20_temp_res_t res; + ds18b20_scratchpad_t scratchpad; +} ds18b20_handler_t; -// Scan all ds18b20 sensors on bus and return its amount. -// Result are saved in array of ds_sensor_t structure. -uint8_t ds18b20_read_all(uint8_t pin, ds_sensor_t *result); +/** + * @brief Initialize DS18B20 + * + * @param device DS18B20 handler + * @param pin Data pin + * @param resolution Temperature resolution + * + * @retval 1: Success + * @retval 0: Incorrect pin or gpio configuration failed (Logs tells which happened) + */ +uint8_t ds18b20_init(ds18b20_handler_t *device, gpio_num_t pin, ds18b20_temp_res_t resolution); -// This method is just to demonstrate how to read -// temperature from single dallas chip. -float ds18b20_read_single(uint8_t pin); +/** + * @brief Send command to DS18B20 + * + * @param device DS18B20 handler + * @param command Function command + */ +void ds18b20_send_command(ds18b20_handler_t *device, ds18b20_commands_t command); -#ifdef __cplusplus -} -#endif +/** + * @brief Write to scratchpad + * + * @param device DS18B20 handler + */ +void ds18b20_write_scratchpad(ds18b20_handler_t *device); -#endif /* DRIVER_DS18B20_H_ */ +/** + * @brief Read from scratchpad + * + * @param device DS18B20 handler + */ +void ds18b20_read_scratchpad(ds18b20_handler_t *device); + +/** + * @brief Copy to scratchpad + * + * @param device DS18B20 handler + */ +void ds18b20_copy_scratchpad(ds18b20_handler_t *device); + +/** + * @brief Print scratchpad bytes + * + * @param device DS18B20 handler + */ +void ds18b20_print_scratchpad(ds18b20_handler_t *device); + +/** + * @brief Initialize temperature conversion and wait for conversion + * + * Function sends CONV_T command and waits for X ms according to `ds18b20_temp_conv_time` static array + * + * @warning Should be called before `ds18b20_convert_temp()` function + * + * @param device DS18B20 handler + */ +void ds18b20_convert_temp(ds18b20_handler_t *device); + +/** + * @brief Read temperature from scratchpad + * + * Function reads temperature from scratchpad and converts it to Celsius. + * @warning `ds18b20_convert_temp()` have to be called before for updated temperature. + * + * @param device DS18B20 handler + */ +float ds18b20_read_temp(ds18b20_handler_t *device); + +#endif \ No newline at end of file diff --git a/embadet/components/onewire/LICENSE b/embadet/components/onewire/LICENSE deleted file mode 100644 index c5a152a..0000000 --- a/embadet/components/onewire/LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 zeroday nodemcu.com - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------------------- - -Portions copyright (C) 2000 Dallas Semiconductor Corporation, under the -following additional terms: - -Except as contained in this notice, the name of Dallas Semiconductor -shall not be used except as stated in the Dallas Semiconductor -Branding Policy. - diff --git a/embadet/components/onewire/README.md b/embadet/components/onewire/README.md deleted file mode 100644 index e490b9a..0000000 --- a/embadet/components/onewire/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Yet another one wire driver for the ESP8266 - -This is a port of a bit-banging one wire driver based on the implementation -from NodeMCU. - -This, in turn, appears to have been based on the PJRC Teensy driver -(https://www.pjrc.com/teensy/td_libs_OneWire.html), by Jim Studt, Paul -Stoffregen, and a host of others. - -The original code is licensed under the MIT license. The CRC code was taken -(at least partially) from Dallas Semiconductor sample code, which was licensed -under an MIT license with an additional clause (prohibiting inappropriate use -of the Dallas Semiconductor name). See the accompanying LICENSE file for -details. diff --git a/embadet/components/onewire/component.mk b/embadet/components/onewire/component.mk old mode 100644 new mode 100755 index c453b58..f941c9f --- a/embadet/components/onewire/component.mk +++ b/embadet/components/onewire/component.mk @@ -1,10 +1,5 @@ -# Component makefile for extras/onewire +# +# Component Makefile +# -# expected anyone using onewire driver includes it as 'onewire/onewire.h' -INC_DIRS += $(onewire_ROOT).. - -# args for passing into compile rule generation -onewire_INC_DIR = -onewire_SRC_DIR = $(onewire_ROOT) - -$(eval $(call component_compile_rules,onewire)) +COMPONENT_ADD_INCLUDEDIRS := . \ No newline at end of file diff --git a/embadet/components/onewire/onewire.c b/embadet/components/onewire/onewire.c old mode 100644 new mode 100755 index 5111271..9ebc03f --- a/embadet/components/onewire/onewire.c +++ b/embadet/components/onewire/onewire.c @@ -1,453 +1,175 @@ +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include "esp_log.h" +#include "rom/ets_sys.h" #include "onewire.h" -#include "string.h" -#include "task.h" -#include "esp/gpio.h" -#define ONEWIRE_SELECT_ROM 0x55 -#define ONEWIRE_SKIP_ROM 0xcc -#define ONEWIRE_SEARCH 0xf0 +uint8_t onewire_configure_gpio(gpio_num_t pin, gpio_config_t *custom_config) +{ + if (!GPIO_IS_VALID_GPIO(pin)) + { + ESP_LOGE(TAG_ONEWIRE, "Provided pin is incorrect!"); -// Waits up to `max_wait` microseconds for the specified pin to go high. -// Returns true if successful, false if the bus never comes high (likely -// shorted). -static inline bool _onewire_wait_for_bus(int pin, int max_wait) { - bool state; - for (int i = 0; i < ((max_wait + 4) / 5); i++) { - if (gpio_read(pin)) break; - sdk_os_delay_us(5); - } - state = gpio_read(pin); - // Wait an extra 1us to make sure the devices have an adequate recovery - // time before we drive things low again. - sdk_os_delay_us(1); - return state; -} - -// Perform the onewire reset function. We will wait up to 250uS for -// the bus to come high, if it doesn't then it is broken or shorted -// and we return false; -// -// Returns true if a device asserted a presence pulse, false otherwise. -// -bool onewire_reset(int pin) { - bool r; - - gpio_enable(pin, GPIO_OUT_OPEN_DRAIN); - gpio_write(pin, 1); - // wait until the wire is high... just in case - if (!_onewire_wait_for_bus(pin, 250)) return false; - - gpio_write(pin, 0); - sdk_os_delay_us(480); - - taskENTER_CRITICAL(); - gpio_write(pin, 1); // allow it to float - sdk_os_delay_us(70); - r = !gpio_read(pin); - taskEXIT_CRITICAL(); - - // Wait for all devices to finish pulling the bus low before returning - if (!_onewire_wait_for_bus(pin, 410)) return false; - - return r; -} - -static bool _onewire_write_bit(int pin, bool v) { - if (!_onewire_wait_for_bus(pin, 10)) return false; - if (v) { - taskENTER_CRITICAL(); - gpio_write(pin, 0); // drive output low - sdk_os_delay_us(10); - gpio_write(pin, 1); // allow output high - taskEXIT_CRITICAL(); - sdk_os_delay_us(55); - } else { - taskENTER_CRITICAL(); - gpio_write(pin, 0); // drive output low - sdk_os_delay_us(65); - gpio_write(pin, 1); // allow output high - taskEXIT_CRITICAL(); - } - sdk_os_delay_us(1); - - return true; -} - -static int _onewire_read_bit(int pin) { - int r; - - if (!_onewire_wait_for_bus(pin, 10)) return -1; - taskENTER_CRITICAL(); - gpio_write(pin, 0); - sdk_os_delay_us(2); - gpio_write(pin, 1); // let pin float, pull up will raise - sdk_os_delay_us(11); - r = gpio_read(pin); // Must sample within 15us of start - taskEXIT_CRITICAL(); - sdk_os_delay_us(48); - - return r; -} - -// Write a byte. The writing code uses open-drain mode and expects the pullup -// resistor to pull the line high when not driven low. If you need strong -// power after the write (e.g. DS18B20 in parasite power mode) then call -// onewire_power() after this is complete to actively drive the line high. -// -bool onewire_write(int pin, uint8_t v) { - uint8_t bitMask; - - for (bitMask = 0x01; bitMask; bitMask <<= 1) { - if (!_onewire_write_bit(pin, (bitMask & v))) { - return false; - } - } - return true; -} - -bool onewire_write_bytes(int pin, const uint8_t *buf, size_t count) { - size_t i; - - for (i = 0; i < count; i++) { - if (!onewire_write(pin, buf[i])) { - return false; - } - } - return true; -} - -// Read a byte -// -int onewire_read(int pin) { - uint8_t bitMask; - int r = 0; - int bit; - - for (bitMask = 0x01; bitMask; bitMask <<= 1) { - bit = _onewire_read_bit(pin); - if (bit < 0) { - return -1; - } else if (bit) { - r |= bitMask; - } - } - return r; -} - -bool onewire_read_bytes(int pin, uint8_t *buf, size_t count) { - size_t i; - int b; - - for (i = 0; i < count; i++) { - b = onewire_read(pin); - if (b < 0) return false; - buf[i] = b; - } - return true; -} - -bool onewire_select(int pin, onewire_addr_t addr) { - uint8_t i; - - if (!onewire_write(pin, ONEWIRE_SELECT_ROM)) { - return false; + return 0; } - for (i = 0; i < 8; i++) { - if (!onewire_write(pin, addr & 0xff)) { - return false; - } - addr >>= 8; + gpio_config_t config = {}; + + if (!custom_config) + { + config.intr_type = GPIO_INTR_DISABLE; + config.mode = GPIO_MODE_OUTPUT_OD; + config.pin_bit_mask = ((uint32_t) 1 << pin); + config.pull_down_en = 0; + config.pull_up_en = 0; + } + else + { + config = *custom_config; } - return true; -} - -bool onewire_skip_rom(int pin) { - return onewire_write(pin, ONEWIRE_SKIP_ROM); -} - -bool onewire_power(int pin) { - // Make sure the bus is not being held low before driving it high, or we - // may end up shorting ourselves out. - if (!_onewire_wait_for_bus(pin, 10)) return false; - - gpio_enable(pin, GPIO_OUTPUT); - gpio_write(pin, 1); - - return true; -} - -void onewire_depower(int pin) { - gpio_enable(pin, GPIO_OUT_OPEN_DRAIN); -} - -void onewire_search_start(onewire_search_t *search) { - // reset the search state - memset(search, 0, sizeof(*search)); -} - -void onewire_search_prefix(onewire_search_t *search, uint8_t family_code) { - uint8_t i; - - search->rom_no[0] = family_code; - for (i = 1; i < 8; i++) { - search->rom_no[i] = 0; + if (gpio_config(&config) != ESP_OK) + { + return 0; } - search->last_discrepancy = 64; - search->last_device_found = false; -} - -// Perform a search. If the next device has been successfully enumerated, its -// ROM address will be returned. If there are no devices, no further -// devices, or something horrible happens in the middle of the -// enumeration then ONEWIRE_NONE is returned. Use OneWire::reset_search() to -// start over. -// -// --- Replaced by the one from the Dallas Semiconductor web site --- -//-------------------------------------------------------------------------- -// Perform the 1-Wire Search Algorithm on the 1-Wire bus using the existing -// search state. -// Return 1 : device found, ROM number in ROM_NO buffer -// 0 : device not found, end of search -// -onewire_addr_t onewire_search_next(onewire_search_t *search, int pin) { - //TODO: add more checking for read/write errors - uint8_t id_bit_number; - uint8_t last_zero, search_result; - int rom_byte_number; - int8_t id_bit, cmp_id_bit; - onewire_addr_t addr; - unsigned char rom_byte_mask; - bool search_direction; - - // initialize for search - id_bit_number = 1; - last_zero = 0; - rom_byte_number = 0; - rom_byte_mask = 1; - search_result = 0; - - // if the last call was not the last one - if (!search->last_device_found) { - // 1-Wire reset - if (!onewire_reset(pin)) { - // reset the search - search->last_discrepancy = 0; - search->last_device_found = false; - return ONEWIRE_NONE; - } - - // issue the search command - onewire_write(pin, ONEWIRE_SEARCH); - - // loop to do the search - do { - // read a bit and its complement - id_bit = _onewire_read_bit(pin); - cmp_id_bit = _onewire_read_bit(pin); - - // check for no devices on 1-wire - if ((id_bit < 0) || (cmp_id_bit < 0)) { - // Read error - break; - } else if ((id_bit == 1) && (cmp_id_bit == 1)) { - break; - } else { - // all devices coupled have 0 or 1 - if (id_bit != cmp_id_bit) { - search_direction = id_bit; // bit write value for search - } else { - // if this discrepancy if before the Last Discrepancy - // on a previous next then pick the same as last time - if (id_bit_number < search->last_discrepancy) { - search_direction = ((search->rom_no[rom_byte_number] & rom_byte_mask) > 0); - } else { - // if equal to last pick 1, if not then pick 0 - search_direction = (id_bit_number == search->last_discrepancy); - } - - // if 0 was picked then record its position in LastZero - if (!search_direction) { - last_zero = id_bit_number; - } - } - - // set or clear the bit in the ROM byte rom_byte_number - // with mask rom_byte_mask - if (search_direction) { - search->rom_no[rom_byte_number] |= rom_byte_mask; - } else { - search->rom_no[rom_byte_number] &= ~rom_byte_mask; - } - - // serial number search direction write bit - _onewire_write_bit(pin, search_direction); - - // increment the byte counter id_bit_number - // and shift the mask rom_byte_mask - id_bit_number++; - rom_byte_mask <<= 1; - - // if the mask is 0 then go to new SerialNum byte rom_byte_number and reset mask - if (rom_byte_mask == 0) { - rom_byte_number++; - rom_byte_mask = 1; - } - } - } while (rom_byte_number < 8); // loop until through all ROM bytes 0-7 - - // if the search was successful then - if (!(id_bit_number < 65)) { - // search successful so set last_discrepancy,last_device_found,search_result - search->last_discrepancy = last_zero; - - // check for last device - if (search->last_discrepancy == 0) { - search->last_device_found = true; - } - - search_result = 1; - } - } - - // if no device found then reset counters so next 'search' will be like a first - if (!search_result || !search->rom_no[0]) { - search->last_discrepancy = 0; - search->last_device_found = false; - return ONEWIRE_NONE; - } else { - addr = 0; - for (rom_byte_number = 7; rom_byte_number >= 0; rom_byte_number--) { - addr = (addr << 8) | search->rom_no[rom_byte_number]; - } - //printf("Ok I found something at %08x%08x...\n", (uint32_t)(addr >> 32), (uint32_t)addr); - } - return addr; -} - -// The 1-Wire CRC scheme is described in Maxim Application Note 27: -// "Understanding and Using Cyclic Redundancy Checks with Maxim iButton Products" -// - -#if ONEWIRE_CRC8_TABLE -// This table comes from Dallas sample code where it is freely reusable, -// though Copyright (C) 2000 Dallas Semiconductor Corporation -static const uint8_t dscrc_table[] = { - 0, 94,188,226, 97, 63,221,131,194,156,126, 32,163,253, 31, 65, - 157,195, 33,127,252,162, 64, 30, 95, 1,227,189, 62, 96,130,220, - 35,125,159,193, 66, 28,254,160,225,191, 93, 3,128,222, 60, 98, - 190,224, 2, 92,223,129, 99, 61,124, 34,192,158, 29, 67,161,255, - 70, 24,250,164, 39,121,155,197,132,218, 56,102,229,187, 89, 7, - 219,133,103, 57,186,228, 6, 88, 25, 71,165,251,120, 38,196,154, - 101, 59,217,135, 4, 90,184,230,167,249, 27, 69,198,152,122, 36, - 248,166, 68, 26,153,199, 37,123, 58,100,134,216, 91, 5,231,185, - 140,210, 48,110,237,179, 81, 15, 78, 16,242,172, 47,113,147,205, - 17, 79,173,243,112, 46,204,146,211,141,111, 49,178,236, 14, 80, - 175,241, 19, 77,206,144,114, 44,109, 51,209,143, 12, 82,176,238, - 50,108,142,208, 83, 13,239,177,240,174, 76, 18,145,207, 45,115, - 202,148,118, 40,171,245, 23, 73, 8, 86,180,234,105, 55,213,139, - 87, 9,235,181, 54,104,138,212,149,203, 41,119,244,170, 72, 22, - 233,183, 85, 11,136,214, 52,106, 43,117,151,201, 74, 20,246,168, - 116, 42,200,150, 21, 75,169,247,182,232, 10, 84,215,137,107, 53}; - -#ifndef pgm_read_byte -#define pgm_read_byte(addr) (*(const uint8_t *)(addr)) -#endif - -// -// Compute a Dallas Semiconductor 8 bit CRC. These show up in the ROM -// and the registers. (note: this might better be done without to -// table, it would probably be smaller and certainly fast enough -// compared to all those delayMicrosecond() calls. But I got -// confused, so I use this table from the examples.) -// -uint8_t onewire_crc8(const uint8_t *data, uint8_t len) { - uint8_t crc = 0; - - while (len--) { - crc = pgm_read_byte(dscrc_table + (crc ^ *data++)); - } - return crc; -} -#else -// -// Compute a Dallas Semiconductor 8 bit CRC directly. -// this is much slower, but much smaller, than the lookup table. -// -uint8_t onewire_crc8(const uint8_t *data, uint8_t len) { - uint8_t crc = 0; - while (len--) { - uint8_t inbyte = *data++; - for (int i = 8; i; i--) { - uint8_t mix = (crc ^ inbyte) & 0x01; - crc >>= 1; - if (mix) crc ^= 0x8C; - inbyte >>= 1; + return 1; +} + +uint8_t onewire_init(onewire_bus_handle_t *bus, gpio_num_t bus_pin, gpio_config_t *custom_config) +{ + if (!bus) + { + ESP_LOGW(TAG_ONEWIRE, "bus is null! (onewire_init)"); + + return 0; + } + + bus->pin = bus_pin; + bus->mutex = xSemaphoreCreateMutex(); + + // configure GPIO + if(!onewire_configure_gpio(bus_pin, custom_config)) + { + return 0; + } + + return 1; +} + +uint8_t onewire_reset(onewire_bus_handle_t *bus) +{ + uint8_t presence; + + if (xSemaphoreTake(bus->mutex, _BLOCK_TIME)) + { + gpio_set_level(bus->pin, 0); // Send reset pulse + ets_delay_us(_ONEWIRE_RESET_WAIT); + + gpio_set_level(bus->pin, 1); // Leave floating + ets_delay_us(_ONEWIRE_PRESENCE_WAIT); + + presence = !gpio_get_level(bus->pin); + + xSemaphoreGive(bus->mutex); + } + else + { + ESP_LOGE(TAG_ONEWIRE, _SEMFAIL_MSG, "onewire_reset"); + + return -1; + } + + ets_delay_us(_ONEWIRE_RESET_RECOVERY); + + return presence; +} + +void onewire_write_bit(onewire_bus_handle_t *bus, uint8_t bit) +{ + if (xSemaphoreTake(bus->mutex, _BLOCK_TIME)) + { + if (bit) + { + // Write 1 + gpio_set_level(bus->pin, 0); + ets_delay_us(_ONEWIRE_WRITE1_LOW); + + gpio_set_level(bus->pin, 1); + ets_delay_us(_ONEWIRE_WRITE1_WAIT); } + else + { + // Write 0 + gpio_set_level(bus->pin, 0); + ets_delay_us(_ONEWIRE_WRITE0_LOW); + + gpio_set_level(bus->pin, 1); + ets_delay_us(_ONEWIRE_WRITE0_WAIT); + } + + xSemaphoreGive(bus->mutex); } - return crc; -} -#endif - -// Compute the 1-Wire CRC16 and compare it against the received CRC. -// Example usage (reading a DS2408): -// // Put everything in a buffer so we can compute the CRC easily. -// uint8_t buf[13]; -// buf[0] = 0xF0; // Read PIO Registers -// buf[1] = 0x88; // LSB address -// buf[2] = 0x00; // MSB address -// WriteBytes(net, buf, 3); // Write 3 cmd bytes -// ReadBytes(net, buf+3, 10); // Read 6 data bytes, 2 0xFF, 2 CRC16 -// if (!CheckCRC16(buf, 11, &buf[11])) { -// // Handle error. -// } -// -// @param input - Array of bytes to checksum. -// @param len - How many bytes to use. -// @param inverted_crc - The two CRC16 bytes in the received data. -// This should just point into the received data, -// *not* at a 16-bit integer. -// @param crc - The crc starting value (optional) -// @return 1, iff the CRC matches. -bool onewire_check_crc16(const uint8_t* input, size_t len, const uint8_t* inverted_crc, uint16_t crc_iv) { - uint16_t crc = ~onewire_crc16(input, len, crc_iv); - return (crc & 0xFF) == inverted_crc[0] && (crc >> 8) == inverted_crc[1]; -} - -// Compute a Dallas Semiconductor 16 bit CRC. This is required to check -// the integrity of data received from many 1-Wire devices. Note that the -// CRC computed here is *not* what you'll get from the 1-Wire network, -// for two reasons: -// 1) The CRC is transmitted bitwise inverted. -// 2) Depending on the endian-ness of your processor, the binary -// representation of the two-byte return value may have a different -// byte order than the two bytes you get from 1-Wire. -// @param input - Array of bytes to checksum. -// @param len - How many bytes to use. -// @param crc - The crc starting value (optional) -// @return The CRC16, as defined by Dallas Semiconductor. -uint16_t onewire_crc16(const uint8_t* input, size_t len, uint16_t crc_iv) { - uint16_t crc = crc_iv; - static const uint8_t oddparity[16] = - { 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 }; - - uint16_t i; - for (i = 0; i < len; i++) { - // Even though we're just copying a byte from the input, - // we'll be doing 16-bit computation with it. - uint16_t cdata = input[i]; - cdata = (cdata ^ crc) & 0xff; - crc >>= 8; - - if (oddparity[cdata & 0x0F] ^ oddparity[cdata >> 4]) - crc ^= 0xC001; - - cdata <<= 6; - crc ^= cdata; - cdata <<= 1; - crc ^= cdata; + else + { + ESP_LOGE(TAG_ONEWIRE, _SEMFAIL_MSG, "onewire_write_bit"); } - return crc; } + +uint8_t onewire_read_bit(onewire_bus_handle_t *bus) +{ + uint8_t bit; + + if (xSemaphoreTake(bus->mutex, _BLOCK_TIME)) + { + gpio_set_level(bus->pin, 0); + ets_delay_us(_ONEWIRE_WRITE1_LOW); + + gpio_set_level(bus->pin, 1); + ets_delay_us(_ONEWIRE_READ_WAIT); + + bit = !gpio_get_level(bus->pin); + + xSemaphoreGive(bus->mutex); + + ets_delay_us(_ONEWIRE_READ_RECOVERY); + } + else + { + ESP_LOGE(TAG_ONEWIRE, _SEMFAIL_MSG, "onewire_read_bit"); + + return -1; + } + + return bit; +} + +void onewire_write_byte(onewire_bus_handle_t *bus, uint8_t byte) +{ + uint8_t i; + + for (i = 0; i < 8; i++) + { + onewire_write_bit(bus, (byte >> i) & 0x01); + } +} + +uint8_t onewire_read_byte(onewire_bus_handle_t *bus) +{ + uint8_t i; + uint8_t byte = 0x0; + + for (i = 0; i < 8; i++) + { + byte |= (!onewire_read_bit(bus) << i); + } + + return byte; +} + +void onewire_send_command(onewire_bus_handle_t *bus, onewire_rom_commands_t command) +{ + uint8_t payload = 0x0 ^ command; + + onewire_write_byte(bus, payload); +} \ No newline at end of file diff --git a/embadet/components/onewire/onewire.h b/embadet/components/onewire/onewire.h old mode 100644 new mode 100755 index ddc88dc..f919017 --- a/embadet/components/onewire/onewire.h +++ b/embadet/components/onewire/onewire.h @@ -1,243 +1,121 @@ -#ifndef __ONEWIRE_H__ -#define __ONEWIRE_H__ +#ifndef ONEWIRE_H +#define ONEWIRE_H -#include // sdk_os_delay_us -#include "FreeRTOS.h" +#include "freertos/FreeRTOS.h" +#include "freertos/semphr.h" +#include "driver/gpio.h" +#include "esp_types.h" +#include "esp_err.h" -#ifdef __cplusplus -extern "C" { -#endif +#define _ONEWIRE_WRITE1_LOW 6 +#define _ONEWIRE_WRITE1_WAIT 64 +#define _ONEWIRE_WRITE0_LOW 60 +#define _ONEWIRE_WRITE0_WAIT 10 +#define _ONEWIRE_READ_WAIT 9 +#define _ONEWIRE_READ_RECOVERY 55 +#define _ONEWIRE_RESET_WAIT 480 +#define _ONEWIRE_PRESENCE_WAIT 70 +#define _ONEWIRE_RESET_RECOVERY 410 -/** @file onewire.h - * - * Routines to access devices using the Dallas Semiconductor 1-Wire(tm) - * protocol. - */ +#define _BLOCK_TIME pdMS_TO_TICKS(1000) +#define _SEMFAIL_MSG "Failed to obtain semaphore. (%s)" -/** Select the table-lookup method of computing the 8-bit CRC - * by setting this to 1 during compilation. The lookup table enlarges code - * size by about 250 bytes. By default, a slower but very compact algorithm - * is used. - */ -#ifndef ONEWIRE_CRC8_TABLE -#define ONEWIRE_CRC8_TABLE 0 -#endif +static const char *TAG_ONEWIRE = "ONEWIRE"; -/** Type used to hold all 1-Wire device ROM addresses (64-bit) */ -typedef uint64_t onewire_addr_t; +typedef enum { + _ROM_READ = 0x33, + _ROM_SEARCH = 0xF0, + _ROM_MATCH = 0x55, + _ROM_SKIP = 0xCC +} onewire_rom_commands_t; -/** Structure to contain the current state for onewire_search_next(), etc */ typedef struct { - uint8_t rom_no[8]; - uint8_t last_discrepancy; - bool last_device_found; -} onewire_search_t; + gpio_num_t pin; + SemaphoreHandle_t mutex; +} onewire_bus_handle_t; -/** ::ONEWIRE_NONE is an invalid ROM address that will never occur in a device - * (CRC mismatch), and so can be useful as an indicator for "no-such-device", - * etc. +/** + * @brief Configure gpio pins for onewire communication + * + * Set `custom_config` to NULL for default config. + * + * @param pin Bus pin + * @param custom_config Custom gpio config + * + * @retval 1: Success + * @retval 0: Incorrect pin or gpio configuration failed (Logs tells which happened) */ -#define ONEWIRE_NONE ((onewire_addr_t)(0xffffffffffffffffLL)) +uint8_t onewire_configure_gpio(gpio_num_t pin, gpio_config_t *custom_config); -/** Perform a 1-Wire reset cycle. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * - * @returns `true` if at least one device responds with a presence pulse, - * `false` if no devices were detected (or the bus is shorted, etc) +/** + * @brief Initalize onewire bus + * + * Set `custom_config` to NULL for default config. + * @warning MUST be called before any other library function! + * + * @param bus Bus handle + * @param pin Bus pin + * @param custom_config Custom gpio config + * + * @retval 1: Success + * @retval 0: `bus` is NULL or gpio configuration failed (Logs tells which happened) */ -bool onewire_reset(int pin); +uint8_t onewire_init(onewire_bus_handle_t *bus, gpio_num_t bus_pin, gpio_config_t *custom_config); -/** Issue a 1-Wire rom select command to select a particular device. - * - * It is necessary to call onewire_reset() before calling this function. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * @param addr The ROM address of the device to select - * - * @returns `true` if the "ROM select" command could be succesfully issued, - * `false` if there was an error. +/** + * @brief Send reset pulse + * + * @param bus Bus handle + * + * @retval 1: Success (device sent presence pulse) + * @retval -1: Failed to obtain semaphore for gpio handling + * @retval 0: Device failed to return presence pulse */ -bool onewire_select(int pin, const onewire_addr_t addr); +uint8_t onewire_reset(onewire_bus_handle_t *bus); -/** Issue a 1-Wire "skip ROM" command to select *all* devices on the bus. - * - * It is necessary to call onewire_reset() before calling this function. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * - * @returns `true` if the "skip ROM" command could be succesfully issued, - * `false` if there was an error. +/** + * @brief Write bit + * + * @param bus Bus handle + * @param bit Bit to send */ -bool onewire_skip_rom(int pin); +void onewire_write_bit(onewire_bus_handle_t *bus, uint8_t bit); -/** Write a byte on the onewire bus. - * - * The writing code uses open-drain mode and expects the pullup resistor to - * pull the line high when not driven low. If you need strong power after the - * write (e.g. DS18B20 in parasite power mode) then call onewire_power() after - * this is complete to actively drive the line high. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * @param v The byte value to write - * - * @returns `true` if successful, `false` on error. +/** + * @brief Write byte + * + * @param bus Bus handle + * @param bit Byte to send */ -bool onewire_write(int pin, uint8_t v); +void onewire_write_byte(onewire_bus_handle_t *bus, uint8_t byte); -/** Write multiple bytes on the 1-Wire bus. - * - * See onewire_write() for more info. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * @param buf A pointer to the buffer of bytes to be written - * @param count Number of bytes to write - * - * @returns `true` if all bytes written successfully, `false` on error. +/** + * @brief Read bit + * + * @param bus Bus handle + * + * @retval 1: Device returned 1 + * @retval 0: Device returned 0 + * @retval -1: Failed to obtain semaphore for gpio handling */ -bool onewire_write_bytes(int pin, const uint8_t *buf, size_t count); +uint8_t onewire_read_bit(onewire_bus_handle_t *bus); -/** Read a byte from a 1-Wire device. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * - * @returns the read byte on success, negative value on error. +/** + * @brief Read bit + * + * @param bus Bus handle + * + * @return Byte returned by device */ -int onewire_read(int pin); +uint8_t onewire_read_byte(onewire_bus_handle_t *bus); -/** Read multiple bytes from a 1-Wire device. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * @param buf A pointer to the buffer to contain the read bytes - * @param count Number of bytes to read - * - * @returns `true` on success, `false` on error. +/** + * @brief Send command to device + * + * @param bus Bus handle + * @param command Onewire rom command + * */ -bool onewire_read_bytes(int pin, uint8_t *buf, size_t count); +void onewire_send_command(onewire_bus_handle_t *bus, onewire_rom_commands_t command); -/** Actively drive the bus high to provide extra power for certain operations - * of parasitically-powered devices. - * - * For parasitically-powered devices which need more power than can be - * provided via the normal pull-up resistor, it may be necessary for some - * operations to drive the bus actively high. This function can be used to - * perform that operation. - * - * The bus can be depowered once it is no longer needed by calling - * onewire_depower(), or it will be depowered automatically the next time - * onewire_reset() is called to start another command. - * - * Note: Make sure the device(s) you are powering will not pull more current - * than the ESP8266 is able to supply via its GPIO pins (this is especially - * important when multiple devices are on the same bus and they are all - * performing a power-intensive operation at the same time (i.e. multiple - * DS18B20 sensors, which have all been given a "convert T" operation by using - * onewire_skip_rom())). - * - * Note: This routine will check to make sure that the bus is already high - * before driving it, to make sure it doesn't attempt to drive it high while - * something else is pulling it low (which could cause a reset or damage the - * ESP8266). - * - * @param pin The GPIO pin connected to the 1-Wire bus. - * - * @returns `true` on success, `false` on error. - */ -bool onewire_power(int pin); - -/** Stop forcing power onto the bus. - * - * You only need to do this if you previously called onewire_power() to drive - * the bus high and now want to allow it to float instead. Note that - * onewire_reset() will also automatically depower the bus first, so you do - * not need to call this first if you just want to start a new operation. - * - * @param pin The GPIO pin connected to the 1-Wire bus. - */ -void onewire_depower(int pin); - -/** Clear the search state so that it will start from the beginning on the next - * call to onewire_search_next(). - * - * @param search The onewire_search_t structure to reset. - */ -void onewire_search_start(onewire_search_t *search); - -/** Setup the search to search for devices with the specified "family code". - * - * @param search The onewire_search_t structure to update. - * @param family_code The "family code" to search for. - */ -void onewire_search_prefix(onewire_search_t *search, uint8_t family_code); - -/** Search for the next device on the bus. - * - * The order of returned device addresses is deterministic. You will always - * get the same devices in the same order. - * - * @returns the address of the next device on the bus, or ::ONEWIRE_NONE if - * there is no next address. ::ONEWIRE_NONE might also mean that the bus is - * shorted, there are no devices, or you have already retrieved all of them. - * - * It might be a good idea to check the CRC to make sure you didn't get - * garbage. - */ -onewire_addr_t onewire_search_next(onewire_search_t *search, int pin); - -/** Compute a Dallas Semiconductor 8 bit CRC. - * - * These are used in the ROM address and scratchpad registers to verify the - * transmitted data is correct. - */ -uint8_t onewire_crc8(const uint8_t *data, uint8_t len); - -/** Compute the 1-Wire CRC16 and compare it against the received CRC. - * - * Example usage (reading a DS2408): - * @code - * // Put everything in a buffer so we can compute the CRC easily. - * uint8_t buf[13]; - * buf[0] = 0xF0; // Read PIO Registers - * buf[1] = 0x88; // LSB address - * buf[2] = 0x00; // MSB address - * onewire_write_bytes(pin, buf, 3); // Write 3 cmd bytes - * onewire_read_bytes(pin, buf+3, 10); // Read 6 data bytes, 2 0xFF, 2 CRC16 - * if (!onewire_check_crc16(buf, 11, &buf[11])) { - * // TODO: Handle error. - * } - * @endcode - * - * @param input Array of bytes to checksum. - * @param len Number of bytes in `input` - * @param inverted_crc The two CRC16 bytes in the received data. - * This should just point into the received data, - * *not* at a 16-bit integer. - * @param crc_iv The crc starting value (optional) - * - * @returns `true` if the CRC matches, `false` otherwise. - */ -bool onewire_check_crc16(const uint8_t* input, size_t len, const uint8_t* inverted_crc, uint16_t crc_iv); - -/** Compute a Dallas Semiconductor 16 bit CRC. - * - * This is required to check the integrity of data received from many 1-Wire - * devices. Note that the CRC computed here is *not* what you'll get from the - * 1-Wire network, for two reasons: - * 1. The CRC is transmitted bitwise inverted. - * 2. Depending on the endian-ness of your processor, the binary - * representation of the two-byte return value may have a different - * byte order than the two bytes you get from 1-Wire. - * - * @param input Array of bytes to checksum. - * @param len How many bytes are in `input`. - * @param crc_iv The crc starting value (optional) - * - * @returns the CRC16, as defined by Dallas Semiconductor. - */ -uint16_t onewire_crc16(const uint8_t* input, size_t len, uint16_t crc_iv); - -#ifdef __cplusplus -} -#endif - -#endif /* __ONEWIRE_H__ */ +#endif \ No newline at end of file diff --git a/embadet/main/apple.c b/embadet/main/apple.c index 98db675..93411e7 100644 --- a/embadet/main/apple.c +++ b/embadet/main/apple.c @@ -1,45 +1,45 @@ - +#include "esp_log.h" #include #include #include #include // Die Header-Datei mit DS18B20-Funktionen +#include -#define GPIO_PIN 4 // GPIO Pin, an den der DS18B20 angeschlossen ist -#define INTERVAL 100 // Intervall in Sekunden +int app_main() { + // Create variable for handler + ds18b20_handler_t sensor; -void delay(int seconds) { - time_t start_time = time(NULL); - while (time(NULL) - start_time < seconds); -} + // Check for any initialization failures + if (!ds18b20_init(&sensor, GPIO_NUM_2, TEMP_RES_12_BIT)) + { + ESP_LOGE("TAG", "Failed to initalize DS18B20!"); -int main() { - ds18b20_addr_t sensor_address; + return 0; // Exit + } - // Sensoren auf dem Bus scannen (angenommen, dass nur ein Sensor angeschlossen ist) - int sensor_count = ds18b20_scan_devices(GPIO_PIN, &sensor_address, 1); - if (sensor_count <= 0) { - printf("Kein DS18B20-Sensor gefunden!\n"); - return -1; - } + float temp = 0; - while (1) { - // Temperaturmessung starten - bool success = ds18b20_measure(GPIO_PIN, sensor_address, true); - if (!success) { - printf("Fehler bei der Temperaturmessung\n"); - } else { - // Temperaturwert lesen - float temperature = ds18b20_read_temperature(GPIO_PIN, sensor_address); - if (temperature != temperature) { // NaN-Check - printf("Fehler beim Lesen der Temperatur\n"); - } else { - printf("Aktuelle Temperatur: %.2f°C\n", temperature); - } - } - // Wartezeit von 100 Sekunden - delay(INTERVAL); - } + + // If you doesn't convert temperature you may read 85.0 Celsius, + // as it is default temperature set by DS18B20 if convert command wasn't issued. + + // Read temperature + printf("hit"); + for(int i = 0; i < 30; ++i) { + // Initalize conversion + ds18b20_convert_temp(&sensor); + temp = ds18b20_read_temp(&sensor); + vTaskDelay(5000 / portTICK_PERIOD_MS); + printf("\n"); + printf( "Temperature = %.4f", temp); + }; + + // Print temperature with 4 decimal places + // (12 bit resolution measurement accuracy is 0.0625 Celsius) + ESP_LOGI("TAG", "Temperature = %.4f", temp); + + return 0; } From 73eaa8982eecee48e12966bf2563a8b51d49b020 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 11 Oct 2024 21:15:04 +0200 Subject: [PATCH 2/5] add mac addres read add struct as commant --- embadet/main/apple.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/embadet/main/apple.c b/embadet/main/apple.c index 93411e7..f516dcc 100644 --- a/embadet/main/apple.c +++ b/embadet/main/apple.c @@ -1,14 +1,32 @@ + #include "esp_log.h" #include #include #include #include // Die Header-Datei mit DS18B20-Funktionen #include +#include + +struct appldata; int app_main() { + + + // Variable to store the MAC address + uint8_t baseMac[6]; + + // Get MAC address of the WiFi station interface + esp_read_mac(baseMac, ESP_MAC_WIFI_STA); + printf("Station MAC: "); + for (int i = 0; i < 5; i++) { + printf("%02X:", baseMac[i]); + } + printf("%02X\n", baseMac[5]); + + + // Create variable for handler ds18b20_handler_t sensor; - // Check for any initialization failures if (!ds18b20_init(&sensor, GPIO_NUM_2, TEMP_RES_12_BIT)) { @@ -16,15 +34,7 @@ int app_main() { return 0; // Exit } - float temp = 0; - - - - // If you doesn't convert temperature you may read 85.0 Celsius, - // as it is default temperature set by DS18B20 if convert command wasn't issued. - - // Read temperature printf("hit"); for(int i = 0; i < 30; ++i) { // Initalize conversion @@ -41,5 +51,17 @@ int app_main() { + + + return 0; } + +/* +struct appldata{ + uint8_t uuid; + signed float temp; + unsigned float battaryVoltage; + unsigned long upTime; +} +*/ \ No newline at end of file From 9a6c4d8748de887d10b64a02d287375c7664af67 Mon Sep 17 00:00:00 2001 From: user Date: Sun, 13 Oct 2024 14:48:06 +0200 Subject: [PATCH 3/5] add Info.md, api edit --- embadet/Info.md | 4 ++++ embadet/build/include/config/auto.conf | 23 ++++++++++++++--------- embadet/build/include/sdkconfig.h | 8 ++++---- embadet/main/apple.c | 18 +++++++++--------- 4 files changed, 31 insertions(+), 22 deletions(-) create mode 100644 embadet/Info.md diff --git a/embadet/Info.md b/embadet/Info.md new file mode 100644 index 0000000..baf5014 --- /dev/null +++ b/embadet/Info.md @@ -0,0 +1,4 @@ +# Info +## sensor isshus +## compiling errors +when the temp input is non tr it mid be a compyling error caude by a falty sdk configuration diff --git a/embadet/build/include/config/auto.conf b/embadet/build/include/config/auto.conf index 6d7fa0d..b887949 100644 --- a/embadet/build/include/config/auto.conf +++ b/embadet/build/include/config/auto.conf @@ -29,6 +29,7 @@ CONFIG_BOOTLOADER_APP_TEST_IN_OTA_1= CONFIG_BOOTLOADER_NUM_PIN_APP_TEST= CONFIG_BOOTLOADER_HOLD_TIME_GPIO= CONFIG_BOOTLOADER_STORE_OFFSET=0x0 +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y CONFIG_SECURE_BOOT_ENABLED= CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH= CONFIG_SECURE_BOOTLOADER_REFLASHABLE= @@ -52,13 +53,13 @@ CONFIG_ESPTOOLPY_BAUD_2MB= CONFIG_ESPTOOLPY_BAUD_OTHER= CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 CONFIG_ESPTOOLPY_BAUD=115200 -CONFIG_ESPTOOLPY_COMPRESSED=y -CONFIG_ESPTOOLPY_FLASHMODE_QIO=y +CONFIG_ESPTOOLPY_COMPRESSED= +CONFIG_ESPTOOLPY_FLASHMODE_QIO= CONFIG_ESPTOOLPY_FLASHMODE_QOUT= -CONFIG_ESPTOOLPY_FLASHMODE_DIO= +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y CONFIG_ESPTOOLPY_FLASHMODE_DOUT= CONFIG_ESPTOOLPY_FLASHMODE="dio" -CONFIG_SPI_FLASH_MODE=0x0 +CONFIG_SPI_FLASH_MODE=0x2 CONFIG_ESPTOOLPY_FLASHFREQ_80M= CONFIG_ESPTOOLPY_FLASHFREQ_40M=y CONFIG_ESPTOOLPY_FLASHFREQ_26M= @@ -100,7 +101,7 @@ CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE= CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT= CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE= -CONFIG_COMPILER_CXX_EXCEPTIONS= +CONFIG_COMPILER_CXX_EXCEPTIONS=y CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y CONFIG_COMPILER_STACK_CHECK_MODE_NORM= CONFIG_COMPILER_STACK_CHECK_MODE_STRONG= @@ -119,6 +120,8 @@ CONFIG_ESP_TLS_USING_MBEDTLS=y CONFIG_ESP_TLS_USING_WOLFSSL= CONFIG_ESP_TLS_SERVER= CONFIG_ESP_TLS_PSK_VERIFICATION= +CONFIG_ESP_TLS_INSECURE= +CONFIG_ESP_TLS_SKIP_SERVER_CERT_VERIFY= CONFIG_ESP_WOLFSSL_SMALL_CERT_VERIFY= CONFIG_ESP_DEBUG_WOLFSSL= CONFIG_ESP_WOLFSSL_INTERNAL= @@ -470,6 +473,7 @@ CONFIG_MBEDTLS_SSL_PROTO_SSL3= CONFIG_MBEDTLS_SSL_PROTO_TLS1=y CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1= CONFIG_MBEDTLS_SSL_PROTO_DTLS= CONFIG_MBEDTLS_SSL_ALPN=y CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y @@ -533,7 +537,7 @@ CONFIG_MQTT_CUSTOM_OUTBOX= CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= -CONFIG_NEWLIB_NANO_FORMAT=y +CONFIG_NEWLIB_NANO_FORMAT= CONFIG_OPENSSL_DEBUG= CONFIG_OPENSSL_DEBUG_LEVEL= CONFIG_OPENSSL_LOWLEVEL_DEBUG= @@ -546,6 +550,7 @@ CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 CONFIG_PTHREAD_STACK_MIN=768 CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +CONFIG_ENABLE_TH25Q16HB_PATCH_0= CONFIG_SPIFFS_MAX_PARTITIONS=3 CONFIG_SPIFFS_CACHE=y CONFIG_SPIFFS_CACHE_WR=y @@ -592,9 +597,9 @@ CONFIG_WPA_SCAN_CACHE= CONFIG_TARGET_PLATFORM="esp8266" CONFIG_TOOLPREFIX="xtensa-lx106-elf-" CONFIG_MAKE_WARN_UNDEFINED_VARIABLES= -CONFIG_FLASHMODE_QIO=y +CONFIG_FLASHMODE_QIO= CONFIG_FLASHMODE_QOUT= -CONFIG_FLASHMODE_DIO= +CONFIG_FLASHMODE_DIO=y CONFIG_FLASHMODE_DOUT= CONFIG_MONITOR_BAUD_9600B= CONFIG_MONITOR_BAUD_57600B= @@ -611,7 +616,7 @@ CONFIG_OPTIMIZATION_LEVEL_RELEASE= CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= -CONFIG_CXX_EXCEPTIONS= +CONFIG_CXX_EXCEPTIONS=y CONFIG_STACK_CHECK_NONE=y CONFIG_STACK_CHECK_NORM= CONFIG_STACK_CHECK_STRONG= diff --git a/embadet/build/include/sdkconfig.h b/embadet/build/include/sdkconfig.h index bcd1fb2..5b8adef 100644 --- a/embadet/build/include/sdkconfig.h +++ b/embadet/build/include/sdkconfig.h @@ -11,14 +11,14 @@ #define CONFIG_LOG_BOOTLOADER_LEVEL_INFO 1 #define CONFIG_LOG_BOOTLOADER_LEVEL 3 #define CONFIG_BOOTLOADER_STORE_OFFSET 0x0 +#define CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT 1 #define CONFIG_ESPTOOLPY_PORT "/dev/ttyUSB0" #define CONFIG_ESPTOOLPY_BAUD_115200B 1 #define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200 #define CONFIG_ESPTOOLPY_BAUD 115200 -#define CONFIG_ESPTOOLPY_COMPRESSED 1 -#define CONFIG_ESPTOOLPY_FLASHMODE_QIO 1 +#define CONFIG_ESPTOOLPY_FLASHMODE_DIO 1 #define CONFIG_ESPTOOLPY_FLASHMODE "dio" -#define CONFIG_SPI_FLASH_MODE 0x0 +#define CONFIG_SPI_FLASH_MODE 0x2 #define CONFIG_ESPTOOLPY_FLASHFREQ_40M 1 #define CONFIG_ESPTOOLPY_FLASHFREQ "40m" #define CONFIG_SPI_FLASH_FREQ 0x0 @@ -38,6 +38,7 @@ #define CONFIG_PARTITION_TABLE_FILENAME "partitions_singleapp.csv" #define CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG 1 #define CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE 1 +#define CONFIG_COMPILER_CXX_EXCEPTIONS 1 #define CONFIG_COMPILER_STACK_CHECK_MODE_NONE 1 #define CONFIG_APP_UPDATE_CHECK_APP_SUM 1 #define CONFIG_APP_COMPILE_TIME_DATE 1 @@ -219,7 +220,6 @@ #define CONFIG_MQTT_TRANSPORT_WEBSOCKET 1 #define CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE 1 #define CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF 1 -#define CONFIG_NEWLIB_NANO_FORMAT 1 #define CONFIG_OPENSSL_ASSERT_DO_NOTHING 1 #define CONFIG_PTHREAD_TASK_PRIO_DEFAULT 5 #define CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT 3072 diff --git a/embadet/main/apple.c b/embadet/main/apple.c index f516dcc..38c86dc 100644 --- a/embadet/main/apple.c +++ b/embadet/main/apple.c @@ -8,7 +8,14 @@ #include struct appldata; - +/* +struct appldata{ + uint8_t mac[6]; + float temp; + float battaryVoltage; + unsigned long upTime; +} +*/ int app_main() { @@ -25,6 +32,7 @@ int app_main() { + // Create variable for handler ds18b20_handler_t sensor; // Check for any initialization failures @@ -57,11 +65,3 @@ int app_main() { return 0; } -/* -struct appldata{ - uint8_t uuid; - signed float temp; - unsigned float battaryVoltage; - unsigned long upTime; -} -*/ \ No newline at end of file From a3879a58326967a478f8a124e40c9b708470c71b Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sun, 13 Oct 2024 14:58:35 +0200 Subject: [PATCH 4/5] clean up build dir again --- embadet/build/include/config/auto.conf | 687 ------------------------- embadet/build/include/sdkconfig.h | 654 ----------------------- 2 files changed, 1341 deletions(-) delete mode 100644 embadet/build/include/config/auto.conf delete mode 100644 embadet/build/include/sdkconfig.h diff --git a/embadet/build/include/config/auto.conf b/embadet/build/include/config/auto.conf deleted file mode 100644 index b887949..0000000 --- a/embadet/build/include/config/auto.conf +++ /dev/null @@ -1,687 +0,0 @@ -# -# Automatically generated file. DO NOT EDIT. -# Espressif IoT Development Framework (ESP-IDF) Project Makefile Configuration -# -CONFIG_IDF_TARGET_ESP8266=y -CONFIG_IDF_TARGET="esp8266" -CONFIG_SDK_TOOLPREFIX="xtensa-lx106-elf-" -CONFIG_SDK_PYTHON="python" -CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES= -CONFIG_BOOTLOADER_INIT_SPI_FLASH=y -CONFIG_BOOTLOADER_DISABLE_JTAG_IO= -CONFIG_BOOTLOADER_FAST_BOOT= -CONFIG_LOG_BOOTLOADER_LEVEL_NONE= -CONFIG_LOG_BOOTLOADER_LEVEL_ERROR= -CONFIG_LOG_BOOTLOADER_LEVEL_WARN= -CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y -CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG= -CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE= -CONFIG_LOG_BOOTLOADER_LEVEL=3 -CONFIG_BOOTLOADER_SPI_WP_PIN= -CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V= -CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V= -CONFIG_BOOTLOADER_FACTORY_RESET= -CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET= -CONFIG_BOOTLOADER_OTA_DATA_ERASE= -CONFIG_BOOTLOADER_DATA_FACTORY_RESET="" -CONFIG_BOOTLOADER_APP_TEST= -CONFIG_BOOTLOADER_APP_TEST_IN_OTA_1= -CONFIG_BOOTLOADER_NUM_PIN_APP_TEST= -CONFIG_BOOTLOADER_HOLD_TIME_GPIO= -CONFIG_BOOTLOADER_STORE_OFFSET=0x0 -CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y -CONFIG_SECURE_BOOT_ENABLED= -CONFIG_SECURE_BOOTLOADER_ONE_TIME_FLASH= -CONFIG_SECURE_BOOTLOADER_REFLASHABLE= -CONFIG_SECURE_BOOT_BUILD_SIGNED_BINARIES= -CONFIG_SECURE_BOOT_SIGNING_KEY="" -CONFIG_SECURE_BOOT_VERIFICATION_KEY="" -CONFIG_SECURE_BOOT_INSECURE= -CONFIG_FLASH_ENCRYPTION_ENABLED= -CONFIG_FLASH_ENCRYPTION_INSECURE= -CONFIG_SECURE_BOOT_ALLOW_ROM_BASIC= -CONFIG_SECURE_BOOT_ALLOW_JTAG= -CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_ENCRYPT= -CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_DECRYPT= -CONFIG_FLASH_ENCRYPTION_UART_BOOTLOADER_ALLOW_CACHE= -CONFIG_SECURE_BOOT_TEST_MODE= -CONFIG_ESPTOOLPY_PORT="/dev/ttyUSB0" -CONFIG_ESPTOOLPY_BAUD_115200B=y -CONFIG_ESPTOOLPY_BAUD_230400B= -CONFIG_ESPTOOLPY_BAUD_921600B= -CONFIG_ESPTOOLPY_BAUD_2MB= -CONFIG_ESPTOOLPY_BAUD_OTHER= -CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 -CONFIG_ESPTOOLPY_BAUD=115200 -CONFIG_ESPTOOLPY_COMPRESSED= -CONFIG_ESPTOOLPY_FLASHMODE_QIO= -CONFIG_ESPTOOLPY_FLASHMODE_QOUT= -CONFIG_ESPTOOLPY_FLASHMODE_DIO=y -CONFIG_ESPTOOLPY_FLASHMODE_DOUT= -CONFIG_ESPTOOLPY_FLASHMODE="dio" -CONFIG_SPI_FLASH_MODE=0x2 -CONFIG_ESPTOOLPY_FLASHFREQ_80M= -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y -CONFIG_ESPTOOLPY_FLASHFREQ_26M= -CONFIG_ESPTOOLPY_FLASHFREQ_20M= -CONFIG_ESPTOOLPY_FLASHFREQ="40m" -CONFIG_SPI_FLASH_FREQ=0x0 -CONFIG_ESPTOOLPY_FLASHSIZE_1MB= -CONFIG_ESPTOOLPY_FLASHSIZE_2MB=y -CONFIG_ESPTOOLPY_FLASHSIZE_4MB= -CONFIG_ESPTOOLPY_FLASHSIZE_8MB= -CONFIG_ESPTOOLPY_FLASHSIZE_16MB= -CONFIG_ESPTOOLPY_FLASHSIZE="2MB" -CONFIG_SPI_FLASH_SIZE=0x200000 -CONFIG_ESPTOOLPY_BEFORE_RESET=y -CONFIG_ESPTOOLPY_BEFORE_NORESET= -CONFIG_ESPTOOLPY_BEFORE="default_reset" -CONFIG_ESPTOOLPY_AFTER_HARD_RESET=y -CONFIG_ESPTOOLPY_AFTER_SOFT_RESET= -CONFIG_ESPTOOLPY_AFTER_NORESET= -CONFIG_ESPTOOLPY_AFTER="hard_reset" -CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B= -CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B= -CONFIG_ESPTOOLPY_MONITOR_BAUD_74880B=y -CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B= -CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B= -CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B= -CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB= -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER= -CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=74880 -CONFIG_ESPTOOLPY_MONITOR_BAUD=74880 -CONFIG_PARTITION_TABLE_SINGLE_APP=y -CONFIG_PARTITION_TABLE_TWO_OTA= -CONFIG_PARTITION_TABLE_CUSTOM= -CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" -CONFIG_PARTITION_TABLE_OFFSET=0x8000 -CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv" -CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE= -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT= -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE= -CONFIG_COMPILER_CXX_EXCEPTIONS=y -CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y -CONFIG_COMPILER_STACK_CHECK_MODE_NORM= -CONFIG_COMPILER_STACK_CHECK_MODE_STRONG= -CONFIG_COMPILER_STACK_CHECK_MODE_ALL= -CONFIG_COMPILER_STACK_CHECK= -CONFIG_COMPILER_WARN_WRITE_STRINGS= -CONFIG_APP_UPDATE_CHECK_APP_SUM=y -CONFIG_APP_UPDATE_CHECK_APP_HASH= -CONFIG_APP_COMPILE_TIME_DATE=y -CONFIG_APP_EXCLUDE_PROJECT_VER_VAR= -CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR= -CONFIG_APP_PROJECT_VER_FROM_CONFIG= -CONFIG_APP_PROJECT_VER="" -CONFIG_ENABLE_COAP= -CONFIG_ESP_TLS_USING_MBEDTLS=y -CONFIG_ESP_TLS_USING_WOLFSSL= -CONFIG_ESP_TLS_SERVER= -CONFIG_ESP_TLS_PSK_VERIFICATION= -CONFIG_ESP_TLS_INSECURE= -CONFIG_ESP_TLS_SKIP_SERVER_CERT_VERIFY= -CONFIG_ESP_WOLFSSL_SMALL_CERT_VERIFY= -CONFIG_ESP_DEBUG_WOLFSSL= -CONFIG_ESP_WOLFSSL_INTERNAL= -CONFIG_WOLFSSL_DEBUG= -CONFIG_ESP8266_NMI_WDT=y -CONFIG_ESP8266_XTAL_FREQ_40= -CONFIG_ESP8266_XTAL_FREQ_26=y -CONFIG_ESP8266_XTAL_FREQ=26 -CONFIG_ESP8266_DEFAULT_CPU_FREQ_80= -CONFIG_ESP8266_DEFAULT_CPU_FREQ_160=y -CONFIG_ESP8266_DEFAULT_CPU_FREQ_MHZ=160 -CONFIG_ESP_FILENAME_MACRO_NO_PATH=y -CONFIG_ESP_FILENAME_MACRO_RAW= -CONFIG_ESP_FILENAME_MACRO_NULL= -CONFIG_USING_NEW_ETS_VPRINTF=y -CONFIG_LINK_ETS_PRINTF_TO_IRAM= -CONFIG_ETS_PRINTF_EXIT_WHEN_FLASH_RW=y -CONFIG_SOC_FULL_ICACHE= -CONFIG_SOC_IRAM_SIZE=0xC000 -CONFIG_DISABLE_ROM_UART_PRINT= -CONFIG_ESP_PANIC_PRINT_HALT= -CONFIG_ESP_PANIC_PRINT_REBOOT=y -CONFIG_ESP_PANIC_SILENT_REBOOT= -CONFIG_ESP_PANIC_GDBSTUB= -CONFIG_RESET_REASON=y -CONFIG_WIFI_PPT_TASKSTACK_SIZE=5120 -CONFIG_ESP8266_CORE_GLOBAL_DATA_LINK_IRAM=y -CONFIG_INIT_OS_BEFORE_START= -CONFIG_ESP8266_OTA_FROM_OLD= -CONFIG_LOAD_OLD_RF_PARAMETER= -CONFIG_ESP8266_BOOT_COPY_APP= -CONFIG_ESP8266_TIME_SYSCALL_USE_FRC1=y -CONFIG_ESP8266_TIME_SYSCALL_USE_NONE= -CONFIG_PM_ENABLE= -CONFIG_SCAN_AP_MAX=99 -CONFIG_WIFI_TX_RATE_SEQUENCE_FROM_HIGH=y -CONFIG_ESP8266_WIFI_QOS_ENABLED= -CONFIG_ESP8266_WIFI_AMPDU_RX_ENABLED= -CONFIG_ESP8266_WIFI_RX_BA_WIN_SIZE= -CONFIG_ESP8266_WIFI_AMSDU_ENABLED= -CONFIG_ESP8266_WIFI_RX_BUFFER_NUM=16 -CONFIG_ESP8266_WIFI_LEFT_CONTINUOUS_RX_BUFFER_NUM=16 -CONFIG_ESP8266_WIFI_RX_PKT_NUM=7 -CONFIG_ESP8266_WIFI_TX_PKT_NUM=6 -CONFIG_ESP8266_WIFI_NVS_ENABLED=y -CONFIG_ESP8266_WIFI_CONNECT_OPEN_ROUTER_WHEN_PWD_IS_SET=y -CONFIG_ESP8266_WIFI_ENABLE_WPA3_SAE=y -CONFIG_ESP8266_WIFI_DEBUG_LOG_ENABLE= -CONFIG_ESP8266_WIFI_DEBUG_LOG_ERROR= -CONFIG_ESP8266_WIFI_DEBUG_LOG_WARNING= -CONFIG_ESP8266_WIFI_DEBUG_LOG_INFO= -CONFIG_ESP8266_WIFI_DEBUG_LOG_DEBUG= -CONFIG_ESP8266_WIFI_DEBUG_LOG_VERBOSE= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_CORE= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_SCAN= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_PM= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_NVS= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_TRC= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_EBUF= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_NET80211= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_TIMER= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_ESPNOW= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_MAC= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_WPA= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_WPS= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_AMPDU= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_AMSDU= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_FRAG= -CONFIG_ESP8266_WIFI_DEBUG_LOG_SUBMODULE_WPA2= -CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y -CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION= -CONFIG_ESP_PHY_INIT_DATA_VDD33_CONST=33 -CONFIG_ESP8266_PHY_MAX_WIFI_TX_POWER=20 -CONFIG_ESP8266_HSPI_HIGH_THROUGHPUT= -CONFIG_ESP_ERR_TO_NAME_LOOKUP=y -CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 -CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048 -CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584 -CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 -CONFIG_ESP_CONSOLE_UART_DEFAULT=y -CONFIG_ESP_CONSOLE_UART_CUSTOM= -CONFIG_ESP_CONSOLE_UART_NONE= -CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0= -CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1= -CONFIG_ESP_CONSOLE_UART_NUM=0 -CONFIG_ESP_CONSOLE_UART_BAUDRATE=74880 -CONFIG_ESP_UART0_SWAP_IO= -CONFIG_ESP_TASK_WDT=y -CONFIG_ESP_TASK_WDT_PANIC=y -CONFIG_ESP_TASK_WDT_TIMEOUT_13N= -CONFIG_ESP_TASK_WDT_TIMEOUT_14N= -CONFIG_ESP_TASK_WDT_TIMEOUT_15N=y -CONFIG_ESP_TASK_WDT_TIMEOUT_S=15 -CONFIG_ESP_EVENT_LOOP_PROFILING= -CONFIG_ESP_EVENT_POST_FROM_ISR=y -CONFIG_ESP_GDBSTUB_ENABLED= -CONFIG_ESP_GDBSTUB_SUPPORT_TASKS= -CONFIG_ESP_GDBSTUB_MAX_TASKS= -CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y -CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH= -CONFIG_HTTP_BUF_SIZE=512 -CONFIG_HTTPD_MAX_REQ_HDR_LEN=512 -CONFIG_HTTPD_MAX_URI_LEN=512 -CONFIG_OTA_BUF_SIZE=256 -CONFIG_OTA_ALLOW_HTTP= -CONFIG_FATFS_CODEPAGE_DYNAMIC= -CONFIG_FATFS_CODEPAGE_437=y -CONFIG_FATFS_CODEPAGE_720= -CONFIG_FATFS_CODEPAGE_737= -CONFIG_FATFS_CODEPAGE_771= -CONFIG_FATFS_CODEPAGE_775= -CONFIG_FATFS_CODEPAGE_850= -CONFIG_FATFS_CODEPAGE_852= -CONFIG_FATFS_CODEPAGE_855= -CONFIG_FATFS_CODEPAGE_857= -CONFIG_FATFS_CODEPAGE_860= -CONFIG_FATFS_CODEPAGE_861= -CONFIG_FATFS_CODEPAGE_862= -CONFIG_FATFS_CODEPAGE_863= -CONFIG_FATFS_CODEPAGE_864= -CONFIG_FATFS_CODEPAGE_865= -CONFIG_FATFS_CODEPAGE_866= -CONFIG_FATFS_CODEPAGE_869= -CONFIG_FATFS_CODEPAGE_932= -CONFIG_FATFS_CODEPAGE_936= -CONFIG_FATFS_CODEPAGE_949= -CONFIG_FATFS_CODEPAGE_950= -CONFIG_FATFS_CODEPAGE=437 -CONFIG_FATFS_LFN_NONE=y -CONFIG_FATFS_LFN_HEAP= -CONFIG_FATFS_LFN_STACK= -CONFIG_FATFS_MAX_LFN= -CONFIG_FATFS_API_ENCODING_ANSI_OEM= -CONFIG_FATFS_API_ENCODING_UTF_16= -CONFIG_FATFS_API_ENCODING_UTF_8= -CONFIG_FATFS_FS_LOCK=0 -CONFIG_FATFS_TIMEOUT_MS=10000 -CONFIG_FATFS_PER_FILE_CACHE=y -CONFIG_FATFS_ALLOC_PREFER_EXTRAM= -CONFIG_FMB_COMM_MODE_TCP_EN=y -CONFIG_FMB_TCP_PORT_DEFAULT=502 -CONFIG_FMB_TCP_PORT_MAX_CONN=5 -CONFIG_FMB_TCP_CONNECTION_TOUT_SEC=20 -CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150 -CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200 -CONFIG_FMB_QUEUE_LENGTH=20 -CONFIG_FMB_PORT_TASK_STACK_SIZE=4096 -CONFIG_FMB_SERIAL_BUF_SIZE=256 -CONFIG_FMB_PORT_TASK_PRIO=10 -CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT=y -CONFIG_FMB_CONTROLLER_SLAVE_ID=0x00112233 -CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20 -CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 -CONFIG_FMB_CONTROLLER_STACK_SIZE=4096 -CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20 -CONFIG_FMB_TIMER_GROUP=0 -CONFIG_FMB_TIMER_INDEX=0 -CONFIG_FMB_TIMER_ISR_IN_IRAM= -CONFIG_DISABLE_FREERTOS= -CONFIG_FREERTOS_UNICORE=y -CONFIG_FREERTOS_ENABLE_REENT= -CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF -CONFIG_FREERTOS_HZ=100 -CONFIG_FREERTOS_MAX_HOOK=2 -CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024 -CONFIG_FREERTOS_ISR_STACKSIZE=512 -CONFIG_FREERTOS_EXTENED_HOOKS= -CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM=y -CONFIG_FREERTOS_CODE_LINK_TO_IRAM= -CONFIG_FREERTOS_TIMER_STACKSIZE=2048 -CONFIG_TASK_SWITCH_FASTER=y -CONFIG_USE_QUEUE_SETS= -CONFIG_ENABLE_FREERTOS_SLEEP= -CONFIG_FREERTOS_USE_TRACE_FACILITY= -CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS= -CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= -CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER= -CONFIG_FREERTOS_RUN_TIME_STATS_USING_CPU_CLK= -CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y -CONFIG_HEAP_DISABLE_IRAM= -CONFIG_HEAP_TRACING= -CONFIG_LIBSODIUM_USE_MBEDTLS_SHA=y -CONFIG_LOG_DEFAULT_LEVEL_NONE= -CONFIG_LOG_DEFAULT_LEVEL_ERROR= -CONFIG_LOG_DEFAULT_LEVEL_WARN= -CONFIG_LOG_DEFAULT_LEVEL_INFO=y -CONFIG_LOG_DEFAULT_LEVEL_DEBUG= -CONFIG_LOG_DEFAULT_LEVEL_VERBOSE= -CONFIG_LOG_DEFAULT_LEVEL=3 -CONFIG_LOG_COLORS=y -CONFIG_LOG_SET_LEVEL= -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y -CONFIG_LWIP_L2_TO_L3_COPY= -CONFIG_LWIP_IRAM_OPTIMIZATION= -CONFIG_LWIP_TIMERS_ONDEMAND=y -CONFIG_LWIP_MAX_SOCKETS=10 -CONFIG_LWIP_USE_ONLY_LWIP_SELECT= -CONFIG_LWIP_SO_LINGER= -CONFIG_LWIP_SO_REUSE=y -CONFIG_LWIP_SO_REUSE_RXTOALL=y -CONFIG_LWIP_SO_RCVBUF= -CONFIG_LWIP_NETBUF_RECVINFO= -CONFIG_LWIP_IP4_FRAG=y -CONFIG_LWIP_IP6_FRAG=y -CONFIG_LWIP_IP4_REASSEMBLY= -CONFIG_LWIP_IP6_REASSEMBLY= -CONFIG_LWIP_IP_FORWARD= -CONFIG_LWIP_IPV4_NAPT= -CONFIG_LWIP_STATS= -CONFIG_LWIP_ETHARP_TRUST_IP_MAC= -CONFIG_LWIP_ESP_GRATUITOUS_ARP=y -CONFIG_LWIP_GARP_TMR_INTERVAL=60 -CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 -CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y -CONFIG_LWIP_DHCP_RESTORE_LAST_IP= -CONFIG_LWIP_DHCPS_LEASE_UNIT=60 -CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 -CONFIG_LWIP_AUTOIP= -CONFIG_LWIP_AUTOIP_TRIES= -CONFIG_LWIP_AUTOIP_MAX_CONFLICTS= -CONFIG_LWIP_AUTOIP_RATE_LIMIT_INTERVAL= -CONFIG_LWIP_IPV6_AUTOCONFIG= -CONFIG_LWIP_NETIF_LOOPBACK=y -CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 -CONFIG_LWIP_MAX_ACTIVE_TCP=16 -CONFIG_LWIP_MAX_LISTENING_TCP=16 -CONFIG_LWIP_TCP_MAXRTX=12 -CONFIG_LWIP_TCP_SYNMAXRTX=6 -CONFIG_LWIP_TCP_MSS=1440 -CONFIG_LWIP_TCP_TMR_INTERVAL=250 -CONFIG_LWIP_TCP_MSL=60000 -CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 -CONFIG_LWIP_TCP_WND_DEFAULT=5760 -CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 -CONFIG_LWIP_TCP_QUEUE_OOSEQ=y -CONFIG_LWIP_TCP_SACK_OUT= -CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= -CONFIG_LWIP_TCP_OVERSIZE_MSS=y -CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS= -CONFIG_LWIP_TCP_OVERSIZE_DISABLE= -CONFIG_LWIP_WND_SCALE= -CONFIG_LWIP_TCP_RCV_SCALE= -CONFIG_LWIP_TCP_RTO_TIME=3000 -CONFIG_LWIP_MAX_UDP_PCBS=16 -CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 -CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2048 -CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0= -CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1= -CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF -CONFIG_LWIP_PPP_SUPPORT= -CONFIG_LWIP_PPP_ENABLE_IPV6= -CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 -CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 -CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT= -CONFIG_LWIP_PPP_PAP_SUPPORT= -CONFIG_LWIP_PPP_CHAP_SUPPORT= -CONFIG_LWIP_PPP_MSCHAP_SUPPORT= -CONFIG_LWIP_PPP_MPPE_SUPPORT= -CONFIG_LWIP_PPP_DEBUG_ON= -CONFIG_LWIP_MULTICAST_PING= -CONFIG_LWIP_BROADCAST_PING= -CONFIG_LWIP_MAX_RAW_PCBS=16 -CONFIG_LWIP_IPV6= -CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1 -CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 -CONFIG_LWIP_ESP_LWIP_ASSERT=y -CONFIG_LWIP_DEBUG= -CONFIG_LWIP_ETHARP_DEBUG= -CONFIG_LWIP_NETIF_DEBUG= -CONFIG_LWIP_PBUF_DEBUG= -CONFIG_LWIP_API_LIB_DEBUG= -CONFIG_LWIP_API_MSG_DEBUG= -CONFIG_LWIP_SOCKETS_DEBUG= -CONFIG_LWIP_ICMP_DEBUG= -CONFIG_LWIP_IGMP_DEBUG= -CONFIG_LWIP_INET_DEBUG= -CONFIG_LWIP_ETHERNETIF_DEBUG= -CONFIG_LWIP_IP_DEBUG= -CONFIG_LWIP_IP_REASS_DEBUG= -CONFIG_LWIP_RAW_DEBUG= -CONFIG_LWIP_MEM_DEBUG= -CONFIG_LWIP_MEMP_DEBUG= -CONFIG_LWIP_SYS_DEBUG= -CONFIG_LWIP_TIMERS_DEBUG= -CONFIG_LWIP_TCP_DEBUG= -CONFIG_LWIP_TCP_INPUT_DEBUG= -CONFIG_LWIP_TCP_FR_DEBUG= -CONFIG_LWIP_TCP_RTO_DEBUG= -CONFIG_LWIP_TCP_CWND_DEBUG= -CONFIG_LWIP_TCP_WND_DEBUG= -CONFIG_LWIP_TCP_OUTPUT_DEBUG= -CONFIG_LWIP_TCP_RST_DEBUG= -CONFIG_LWIP_TCP_QLEN_DEBUG= -CONFIG_LWIP_UDP_DEBUG= -CONFIG_LWIP_TCPIP_DEBUG= -CONFIG_LWIP_SLIP_DEBUG= -CONFIG_LWIP_DHCP_DEBUG= -CONFIG_LWIP_DHCP_SERVER_DEBUG= -CONFIG_LWIP_AUTOIP_DEBUG= -CONFIG_LWIP_DNS_DEBUG= -CONFIG_LWIP_IP6_DEBUG= -CONFIG_LWIP_SNTP_DEBUG= -CONFIG_LWIP_THREAD_SAFE_DEBUG= -CONFIG_LWIP_PBUF_CACHE_DEBUG= -CONFIG_LWIP_TCP_TXRX_PBUF_DEBUG= -CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y -CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC= -CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC= -CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC= -CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN= -CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y -CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 -CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096 -CONFIG_MBEDTLS_DYNAMIC_BUFFER= -CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT= -CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA= -CONFIG_MBEDTLS_DEBUG= -CONFIG_MBEDTLS_DEBUG_LEVEL_WARN= -CONFIG_MBEDTLS_DEBUG_LEVEL_INFO= -CONFIG_MBEDTLS_DEBUG_LEVEL_DEBUG= -CONFIG_MBEDTLS_DEBUG_LEVEL_VERBOSE= -CONFIG_MBEDTLS_DEBUG_LEVEL= -CONFIG_MBEDTLS_HAVE_TIME=y -CONFIG_MBEDTLS_HAVE_TIME_DATE= -CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y -CONFIG_MBEDTLS_TLS_SERVER_ONLY= -CONFIG_MBEDTLS_TLS_CLIENT_ONLY= -CONFIG_MBEDTLS_TLS_DISABLED= -CONFIG_MBEDTLS_TLS_SERVER=y -CONFIG_MBEDTLS_TLS_CLIENT=y -CONFIG_MBEDTLS_TLS_ENABLED=y -CONFIG_MBEDTLS_PSK_MODES= -CONFIG_MBEDTLS_KEY_EXCHANGE_PSK= -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK= -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK= -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK= -CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y -CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y -CONFIG_MBEDTLS_SSL_RENEGOTIATION=y -CONFIG_MBEDTLS_SSL_PROTO_SSL3= -CONFIG_MBEDTLS_SSL_PROTO_TLS1=y -CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y -CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y -CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1= -CONFIG_MBEDTLS_SSL_PROTO_DTLS= -CONFIG_MBEDTLS_SSL_ALPN=y -CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y -CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y -CONFIG_MBEDTLS_AES_C=y -CONFIG_MBEDTLS_CAMELLIA_C= -CONFIG_MBEDTLS_DES_C= -CONFIG_MBEDTLS_RC4_DISABLED=y -CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT= -CONFIG_MBEDTLS_RC4_ENABLED= -CONFIG_MBEDTLS_BLOWFISH_C= -CONFIG_MBEDTLS_XTEA_C= -CONFIG_MBEDTLS_CCM_C=y -CONFIG_MBEDTLS_GCM_C=y -CONFIG_MBEDTLS_RIPEMD160_C= -CONFIG_MBEDTLS_PEM_PARSE_C=y -CONFIG_MBEDTLS_PEM_WRITE_C=y -CONFIG_MBEDTLS_X509_CRL_PARSE_C=y -CONFIG_MBEDTLS_X509_CSR_PARSE_C=y -CONFIG_MBEDTLS_ECP_C=y -CONFIG_MBEDTLS_ECDH_C=y -CONFIG_MBEDTLS_ECDSA_C=y -CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y -CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y -CONFIG_MBEDTLS_ECP_NIST_OPTIM=y -CONFIG_util_assert= -CONFIG_ESP_SHA= -CONFIG_ESP_AES=y -CONFIG_ESP_MD5=y -CONFIG_ESP_ARC4=y -CONFIG_ENABLE_MDNS= -CONFIG_ENABLE_MDNS_CONSOLE= -CONFIG_MDNS_MAX_SERVICES= -CONFIG_MQTT_PROTOCOL_311=y -CONFIG_MQTT_TRANSPORT_SSL=y -CONFIG_MQTT_TRANSPORT_WEBSOCKET=y -CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y -CONFIG_MQTT_USE_CUSTOM_CONFIG= -CONFIG_MQTT_TCP_DEFAULT_PORT= -CONFIG_MQTT_SSL_DEFAULT_PORT= -CONFIG_MQTT_WS_DEFAULT_PORT= -CONFIG_MQTT_WSS_DEFAULT_PORT= -CONFIG_MQTT_BUFFER_SIZE= -CONFIG_MQTT_TASK_STACK_SIZE= -CONFIG_MQTT_DISABLE_API_LOCKS= -CONFIG_MQTT_TASK_PRIORITY= -CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED= -CONFIG_MQTT_USE_CORE_0= -CONFIG_MQTT_USE_CORE_1= -CONFIG_MQTT_CUSTOM_OUTBOX= -CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y -CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF= -CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR= -CONFIG_NEWLIB_NANO_FORMAT= -CONFIG_OPENSSL_DEBUG= -CONFIG_OPENSSL_DEBUG_LEVEL= -CONFIG_OPENSSL_LOWLEVEL_DEBUG= -CONFIG_OPENSSL_ASSERT_DO_NOTHING=y -CONFIG_OPENSSL_ASSERT_EXIT= -CONFIG_OPENSSL_ASSERT_DEBUG= -CONFIG_OPENSSL_ASSERT_DEBUG_EXIT= -CONFIG_OPENSSL_ASSERT_DEBUG_BLOCK= -CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_PTHREAD_STACK_MIN=768 -CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" -CONFIG_ENABLE_TH25Q16HB_PATCH_0= -CONFIG_SPIFFS_MAX_PARTITIONS=3 -CONFIG_SPIFFS_CACHE=y -CONFIG_SPIFFS_CACHE_WR=y -CONFIG_SPIFFS_CACHE_STATS= -CONFIG_SPIFFS_PAGE_CHECK=y -CONFIG_SPIFFS_GC_MAX_RUNS=10 -CONFIG_SPIFFS_GC_STATS= -CONFIG_SPIFFS_PAGE_SIZE=256 -CONFIG_SPIFFS_OBJ_NAME_LEN=32 -CONFIG_SPIFFS_USE_MAGIC=y -CONFIG_SPIFFS_USE_MAGIC_LENGTH=y -CONFIG_SPIFFS_META_LENGTH=4 -CONFIG_SPIFFS_USE_MTIME=y -CONFIG_SPIFFS_DBG= -CONFIG_SPIFFS_API_DBG= -CONFIG_SPIFFS_GC_DBG= -CONFIG_SPIFFS_CACHE_DBG= -CONFIG_SPIFFS_CHECK_DBG= -CONFIG_SPIFFS_TEST_VISUALISATION= -CONFIG_IP_LOST_TIMER_INTERVAL=120 -CONFIG_TCPIP_ADAPTER_GLOBAL_DATA_LINK_IRAM=y -CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_VFS_SUPPORT_TERMIOS=y -CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 -CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 -CONFIG_WL_SECTOR_SIZE_512= -CONFIG_WL_SECTOR_SIZE_4096=y -CONFIG_WL_SECTOR_SIZE=4096 -CONFIG_WL_SECTOR_MODE_PERF= -CONFIG_WL_SECTOR_MODE_SAFE= -CONFIG_WL_SECTOR_MODE= -CONFIG_ENABLE_UNIFIED_PROVISIONING= -CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES= -CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT= -CONFIG_LTM_FAST=y -CONFIG_WPA_MBEDTLS_CRYPTO=y -CONFIG_WPA_DEBUG_PRINT= -CONFIG_WPA_TESTING_OPTIONS= -CONFIG_WPA_WPS_WARS= -CONFIG_WPA_11KV_SUPPORT= -CONFIG_WPA_SCAN_CACHE= - -# List of deprecated options -CONFIG_TARGET_PLATFORM="esp8266" -CONFIG_TOOLPREFIX="xtensa-lx106-elf-" -CONFIG_MAKE_WARN_UNDEFINED_VARIABLES= -CONFIG_FLASHMODE_QIO= -CONFIG_FLASHMODE_QOUT= -CONFIG_FLASHMODE_DIO=y -CONFIG_FLASHMODE_DOUT= -CONFIG_MONITOR_BAUD_9600B= -CONFIG_MONITOR_BAUD_57600B= -CONFIG_MONITOR_BAUD_74880B=y -CONFIG_MONITOR_BAUD_115200B= -CONFIG_MONITOR_BAUD_230400B= -CONFIG_MONITOR_BAUD_921600B= -CONFIG_MONITOR_BAUD_2MB= -CONFIG_MONITOR_BAUD_OTHER= -CONFIG_MONITOR_BAUD_OTHER_VAL=74880 -CONFIG_MONITOR_BAUD=74880 -CONFIG_OPTIMIZATION_LEVEL_DEBUG=y -CONFIG_OPTIMIZATION_LEVEL_RELEASE= -CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y -CONFIG_OPTIMIZATION_ASSERTIONS_SILENT= -CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED= -CONFIG_CXX_EXCEPTIONS=y -CONFIG_STACK_CHECK_NONE=y -CONFIG_STACK_CHECK_NORM= -CONFIG_STACK_CHECK_STRONG= -CONFIG_STACK_CHECK_ALL= -CONFIG_STACK_CHECK= -CONFIG_WARN_WRITE_STRINGS= -CONFIG_MAIN_TASK_STACK_SIZE=3584 -CONFIG_CONSOLE_UART_DEFAULT=y -CONFIG_CONSOLE_UART_CUSTOM= -CONFIG_CONSOLE_UART_NONE= -CONFIG_CONSOLE_UART_CUSTOM_NUM_0= -CONFIG_CONSOLE_UART_CUSTOM_NUM_1= -CONFIG_CONSOLE_UART_NUM=0 -CONFIG_CONSOLE_UART_BAUDRATE=74880 -CONFIG_UART0_SWAP_IO= -CONFIG_TASK_WDT=y -CONFIG_TASK_WDT_PANIC=y -CONFIG_TASK_WDT_TIMEOUT_S=15 -CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150 -CONFIG_MB_MASTER_DELAY_MS_CONVERT=200 -CONFIG_MB_QUEUE_LENGTH=20 -CONFIG_MB_SERIAL_TASK_STACK_SIZE=4096 -CONFIG_MB_SERIAL_BUF_SIZE=256 -CONFIG_MB_SERIAL_TASK_PRIO=10 -CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT=y -CONFIG_MB_CONTROLLER_SLAVE_ID=0x00112233 -CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20 -CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20 -CONFIG_MB_CONTROLLER_STACK_SIZE=4096 -CONFIG_MB_EVENT_QUEUE_TIMEOUT=20 -CONFIG_MB_TIMER_GROUP=0 -CONFIG_MB_TIMER_INDEX=0 -CONFIG_L2_TO_L3_COPY= -CONFIG_USE_ONLY_LWIP_SELECT= -CONFIG_ESP_GRATUITOUS_ARP=y -CONFIG_GARP_TMR_INTERVAL=60 -CONFIG_TCPIP_RECVMBOX_SIZE=32 -CONFIG_TCP_MAXRTX=12 -CONFIG_TCP_SYNMAXRTX=6 -CONFIG_TCP_MSS=1440 -CONFIG_TCP_MSL=60000 -CONFIG_TCP_SND_BUF_DEFAULT=2880 -CONFIG_TCP_WND_DEFAULT=5760 -CONFIG_TCP_RECVMBOX_SIZE=6 -CONFIG_TCP_QUEUE_OOSEQ=y -CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES= -CONFIG_TCP_OVERSIZE_MSS=y -CONFIG_TCP_OVERSIZE_QUARTER_MSS= -CONFIG_TCP_OVERSIZE_DISABLE= -CONFIG_UDP_RECVMBOX_SIZE=6 -CONFIG_TCPIP_TASK_STACK_SIZE=2048 -CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y -CONFIG_TCPIP_TASK_AFFINITY_CPU0= -CONFIG_TCPIP_TASK_AFFINITY_CPU1= -CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF -CONFIG_PPP_SUPPORT= -CONFIG_PPP_NOTIFY_PHASE_SUPPORT= -CONFIG_PPP_PAP_SUPPORT= -CONFIG_PPP_CHAP_SUPPORT= -CONFIG_PPP_MSCHAP_SUPPORT= -CONFIG_PPP_MPPE_SUPPORT= -CONFIG_PPP_DEBUG_ON= -CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 -CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 -CONFIG_ESP32_PTHREAD_STACK_MIN=768 -CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" -CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y -CONFIG_SUPPORT_TERMIOS=y diff --git a/embadet/build/include/sdkconfig.h b/embadet/build/include/sdkconfig.h deleted file mode 100644 index 5b8adef..0000000 --- a/embadet/build/include/sdkconfig.h +++ /dev/null @@ -1,654 +0,0 @@ -/* - * Automatically generated file. DO NOT EDIT. - * Espressif IoT Development Framework (ESP-IDF) Configuration Header - */ -#pragma once -#define CONFIG_IDF_TARGET_ESP8266 1 -#define CONFIG_IDF_TARGET "esp8266" -#define CONFIG_SDK_TOOLPREFIX "xtensa-lx106-elf-" -#define CONFIG_SDK_PYTHON "python" -#define CONFIG_BOOTLOADER_INIT_SPI_FLASH 1 -#define CONFIG_LOG_BOOTLOADER_LEVEL_INFO 1 -#define CONFIG_LOG_BOOTLOADER_LEVEL 3 -#define CONFIG_BOOTLOADER_STORE_OFFSET 0x0 -#define CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT 1 -#define CONFIG_ESPTOOLPY_PORT "/dev/ttyUSB0" -#define CONFIG_ESPTOOLPY_BAUD_115200B 1 -#define CONFIG_ESPTOOLPY_BAUD_OTHER_VAL 115200 -#define CONFIG_ESPTOOLPY_BAUD 115200 -#define CONFIG_ESPTOOLPY_FLASHMODE_DIO 1 -#define CONFIG_ESPTOOLPY_FLASHMODE "dio" -#define CONFIG_SPI_FLASH_MODE 0x2 -#define CONFIG_ESPTOOLPY_FLASHFREQ_40M 1 -#define CONFIG_ESPTOOLPY_FLASHFREQ "40m" -#define CONFIG_SPI_FLASH_FREQ 0x0 -#define CONFIG_ESPTOOLPY_FLASHSIZE_2MB 1 -#define CONFIG_ESPTOOLPY_FLASHSIZE "2MB" -#define CONFIG_SPI_FLASH_SIZE 0x200000 -#define CONFIG_ESPTOOLPY_BEFORE_RESET 1 -#define CONFIG_ESPTOOLPY_BEFORE "default_reset" -#define CONFIG_ESPTOOLPY_AFTER_HARD_RESET 1 -#define CONFIG_ESPTOOLPY_AFTER "hard_reset" -#define CONFIG_ESPTOOLPY_MONITOR_BAUD_74880B 1 -#define CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL 74880 -#define CONFIG_ESPTOOLPY_MONITOR_BAUD 74880 -#define CONFIG_PARTITION_TABLE_SINGLE_APP 1 -#define CONFIG_PARTITION_TABLE_CUSTOM_FILENAME "partitions.csv" -#define CONFIG_PARTITION_TABLE_OFFSET 0x8000 -#define CONFIG_PARTITION_TABLE_FILENAME "partitions_singleapp.csv" -#define CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG 1 -#define CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE 1 -#define CONFIG_COMPILER_CXX_EXCEPTIONS 1 -#define CONFIG_COMPILER_STACK_CHECK_MODE_NONE 1 -#define CONFIG_APP_UPDATE_CHECK_APP_SUM 1 -#define CONFIG_APP_COMPILE_TIME_DATE 1 -#define CONFIG_ESP_TLS_USING_MBEDTLS 1 -#define CONFIG_ESP8266_NMI_WDT 1 -#define CONFIG_ESP8266_XTAL_FREQ_26 1 -#define CONFIG_ESP8266_XTAL_FREQ 26 -#define CONFIG_ESP8266_DEFAULT_CPU_FREQ_160 1 -#define CONFIG_ESP8266_DEFAULT_CPU_FREQ_MHZ 160 -#define CONFIG_ESP_FILENAME_MACRO_NO_PATH 1 -#define CONFIG_USING_NEW_ETS_VPRINTF 1 -#define CONFIG_ETS_PRINTF_EXIT_WHEN_FLASH_RW 1 -#define CONFIG_SOC_IRAM_SIZE 0xC000 -#define CONFIG_ESP_PANIC_PRINT_REBOOT 1 -#define CONFIG_RESET_REASON 1 -#define CONFIG_WIFI_PPT_TASKSTACK_SIZE 5120 -#define CONFIG_ESP8266_CORE_GLOBAL_DATA_LINK_IRAM 1 -#define CONFIG_ESP8266_TIME_SYSCALL_USE_FRC1 1 -#define CONFIG_SCAN_AP_MAX 99 -#define CONFIG_WIFI_TX_RATE_SEQUENCE_FROM_HIGH 1 -#define CONFIG_ESP8266_WIFI_RX_BUFFER_NUM 16 -#define CONFIG_ESP8266_WIFI_LEFT_CONTINUOUS_RX_BUFFER_NUM 16 -#define CONFIG_ESP8266_WIFI_RX_PKT_NUM 7 -#define CONFIG_ESP8266_WIFI_TX_PKT_NUM 6 -#define CONFIG_ESP8266_WIFI_NVS_ENABLED 1 -#define CONFIG_ESP8266_WIFI_CONNECT_OPEN_ROUTER_WHEN_PWD_IS_SET 1 -#define CONFIG_ESP8266_WIFI_ENABLE_WPA3_SAE 1 -#define CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE 1 -#define CONFIG_ESP_PHY_INIT_DATA_VDD33_CONST 33 -#define CONFIG_ESP8266_PHY_MAX_WIFI_TX_POWER 20 -#define CONFIG_ESP_ERR_TO_NAME_LOOKUP 1 -#define CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE 32 -#define CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE 2048 -#define CONFIG_ESP_MAIN_TASK_STACK_SIZE 3584 -#define CONFIG_ESP_TIMER_TASK_STACK_SIZE 3584 -#define CONFIG_ESP_CONSOLE_UART_DEFAULT 1 -#define CONFIG_ESP_CONSOLE_UART_NUM 0 -#define CONFIG_ESP_CONSOLE_UART_BAUDRATE 74880 -#define CONFIG_ESP_TASK_WDT 1 -#define CONFIG_ESP_TASK_WDT_PANIC 1 -#define CONFIG_ESP_TASK_WDT_TIMEOUT_15N 1 -#define CONFIG_ESP_TASK_WDT_TIMEOUT_S 15 -#define CONFIG_ESP_EVENT_POST_FROM_ISR 1 -#define CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS 1 -#define CONFIG_HTTP_BUF_SIZE 512 -#define CONFIG_HTTPD_MAX_REQ_HDR_LEN 512 -#define CONFIG_HTTPD_MAX_URI_LEN 512 -#define CONFIG_OTA_BUF_SIZE 256 -#define CONFIG_FATFS_CODEPAGE_437 1 -#define CONFIG_FATFS_CODEPAGE 437 -#define CONFIG_FATFS_LFN_NONE 1 -#define CONFIG_FATFS_FS_LOCK 0 -#define CONFIG_FATFS_TIMEOUT_MS 10000 -#define CONFIG_FATFS_PER_FILE_CACHE 1 -#define CONFIG_FMB_COMM_MODE_TCP_EN 1 -#define CONFIG_FMB_TCP_PORT_DEFAULT 502 -#define CONFIG_FMB_TCP_PORT_MAX_CONN 5 -#define CONFIG_FMB_TCP_CONNECTION_TOUT_SEC 20 -#define CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND 150 -#define CONFIG_FMB_MASTER_DELAY_MS_CONVERT 200 -#define CONFIG_FMB_QUEUE_LENGTH 20 -#define CONFIG_FMB_PORT_TASK_STACK_SIZE 4096 -#define CONFIG_FMB_SERIAL_BUF_SIZE 256 -#define CONFIG_FMB_PORT_TASK_PRIO 10 -#define CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT 1 -#define CONFIG_FMB_CONTROLLER_SLAVE_ID 0x00112233 -#define CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT 20 -#define CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE 20 -#define CONFIG_FMB_CONTROLLER_STACK_SIZE 4096 -#define CONFIG_FMB_EVENT_QUEUE_TIMEOUT 20 -#define CONFIG_FMB_TIMER_GROUP 0 -#define CONFIG_FMB_TIMER_INDEX 0 -#define CONFIG_FREERTOS_UNICORE 1 -#define CONFIG_FREERTOS_NO_AFFINITY 0x7FFFFFFF -#define CONFIG_FREERTOS_HZ 100 -#define CONFIG_FREERTOS_MAX_HOOK 2 -#define CONFIG_FREERTOS_IDLE_TASK_STACKSIZE 1024 -#define CONFIG_FREERTOS_ISR_STACKSIZE 512 -#define CONFIG_FREERTOS_GLOBAL_DATA_LINK_IRAM 1 -#define CONFIG_FREERTOS_TIMER_STACKSIZE 2048 -#define CONFIG_TASK_SWITCH_FASTER 1 -#define CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK 1 -#define CONFIG_LIBSODIUM_USE_MBEDTLS_SHA 1 -#define CONFIG_LOG_DEFAULT_LEVEL_INFO 1 -#define CONFIG_LOG_DEFAULT_LEVEL 3 -#define CONFIG_LOG_COLORS 1 -#define CONFIG_LWIP_LOCAL_HOSTNAME "espressif" -#define CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES 1 -#define CONFIG_LWIP_TIMERS_ONDEMAND 1 -#define CONFIG_LWIP_MAX_SOCKETS 10 -#define CONFIG_LWIP_SO_REUSE 1 -#define CONFIG_LWIP_SO_REUSE_RXTOALL 1 -#define CONFIG_LWIP_IP4_FRAG 1 -#define CONFIG_LWIP_IP6_FRAG 1 -#define CONFIG_LWIP_ESP_GRATUITOUS_ARP 1 -#define CONFIG_LWIP_GARP_TMR_INTERVAL 60 -#define CONFIG_LWIP_TCPIP_RECVMBOX_SIZE 32 -#define CONFIG_LWIP_DHCP_DOES_ARP_CHECK 1 -#define CONFIG_LWIP_DHCPS_LEASE_UNIT 60 -#define CONFIG_LWIP_DHCPS_MAX_STATION_NUM 8 -#define CONFIG_LWIP_NETIF_LOOPBACK 1 -#define CONFIG_LWIP_LOOPBACK_MAX_PBUFS 8 -#define CONFIG_LWIP_MAX_ACTIVE_TCP 16 -#define CONFIG_LWIP_MAX_LISTENING_TCP 16 -#define CONFIG_LWIP_TCP_MAXRTX 12 -#define CONFIG_LWIP_TCP_SYNMAXRTX 6 -#define CONFIG_LWIP_TCP_MSS 1440 -#define CONFIG_LWIP_TCP_TMR_INTERVAL 250 -#define CONFIG_LWIP_TCP_MSL 60000 -#define CONFIG_LWIP_TCP_SND_BUF_DEFAULT 2880 -#define CONFIG_LWIP_TCP_WND_DEFAULT 5760 -#define CONFIG_LWIP_TCP_RECVMBOX_SIZE 6 -#define CONFIG_LWIP_TCP_QUEUE_OOSEQ 1 -#define CONFIG_LWIP_TCP_OVERSIZE_MSS 1 -#define CONFIG_LWIP_TCP_RTO_TIME 3000 -#define CONFIG_LWIP_MAX_UDP_PCBS 16 -#define CONFIG_LWIP_UDP_RECVMBOX_SIZE 6 -#define CONFIG_LWIP_TCPIP_TASK_STACK_SIZE 2048 -#define CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY 1 -#define CONFIG_LWIP_TCPIP_TASK_AFFINITY 0x7FFFFFFF -#define CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE 3 -#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5 -#define CONFIG_LWIP_MAX_RAW_PCBS 16 -#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1 -#define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000 -#define CONFIG_LWIP_ESP_LWIP_ASSERT 1 -#define CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC 1 -#define CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN 1 -#define CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN 16384 -#define CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN 4096 -#define CONFIG_MBEDTLS_HAVE_TIME 1 -#define CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT 1 -#define CONFIG_MBEDTLS_TLS_SERVER 1 -#define CONFIG_MBEDTLS_TLS_CLIENT 1 -#define CONFIG_MBEDTLS_TLS_ENABLED 1 -#define CONFIG_MBEDTLS_KEY_EXCHANGE_RSA 1 -#define CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA 1 -#define CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE 1 -#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA 1 -#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA 1 -#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA 1 -#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA 1 -#define CONFIG_MBEDTLS_SSL_RENEGOTIATION 1 -#define CONFIG_MBEDTLS_SSL_PROTO_TLS1 1 -#define CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 1 -#define CONFIG_MBEDTLS_SSL_PROTO_TLS1_2 1 -#define CONFIG_MBEDTLS_SSL_ALPN 1 -#define CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS 1 -#define CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS 1 -#define CONFIG_MBEDTLS_AES_C 1 -#define CONFIG_MBEDTLS_RC4_DISABLED 1 -#define CONFIG_MBEDTLS_CCM_C 1 -#define CONFIG_MBEDTLS_GCM_C 1 -#define CONFIG_MBEDTLS_PEM_PARSE_C 1 -#define CONFIG_MBEDTLS_PEM_WRITE_C 1 -#define CONFIG_MBEDTLS_X509_CRL_PARSE_C 1 -#define CONFIG_MBEDTLS_X509_CSR_PARSE_C 1 -#define CONFIG_MBEDTLS_ECP_C 1 -#define CONFIG_MBEDTLS_ECDH_C 1 -#define CONFIG_MBEDTLS_ECDSA_C 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED 1 -#define CONFIG_MBEDTLS_ECP_NIST_OPTIM 1 -#define CONFIG_ESP_AES 1 -#define CONFIG_ESP_MD5 1 -#define CONFIG_ESP_ARC4 1 -#define CONFIG_MQTT_PROTOCOL_311 1 -#define CONFIG_MQTT_TRANSPORT_SSL 1 -#define CONFIG_MQTT_TRANSPORT_WEBSOCKET 1 -#define CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE 1 -#define CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF 1 -#define CONFIG_OPENSSL_ASSERT_DO_NOTHING 1 -#define CONFIG_PTHREAD_TASK_PRIO_DEFAULT 5 -#define CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT 3072 -#define CONFIG_PTHREAD_STACK_MIN 768 -#define CONFIG_PTHREAD_TASK_NAME_DEFAULT "pthread" -#define CONFIG_SPIFFS_MAX_PARTITIONS 3 -#define CONFIG_SPIFFS_CACHE 1 -#define CONFIG_SPIFFS_CACHE_WR 1 -#define CONFIG_SPIFFS_PAGE_CHECK 1 -#define CONFIG_SPIFFS_GC_MAX_RUNS 10 -#define CONFIG_SPIFFS_PAGE_SIZE 256 -#define CONFIG_SPIFFS_OBJ_NAME_LEN 32 -#define CONFIG_SPIFFS_USE_MAGIC 1 -#define CONFIG_SPIFFS_USE_MAGIC_LENGTH 1 -#define CONFIG_SPIFFS_META_LENGTH 4 -#define CONFIG_SPIFFS_USE_MTIME 1 -#define CONFIG_IP_LOST_TIMER_INTERVAL 120 -#define CONFIG_TCPIP_ADAPTER_GLOBAL_DATA_LINK_IRAM 1 -#define CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT 1 -#define CONFIG_VFS_SUPPORT_TERMIOS 1 -#define CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS 1 -#define CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN 128 -#define CONFIG_WL_SECTOR_SIZE_4096 1 -#define CONFIG_WL_SECTOR_SIZE 4096 -#define CONFIG_LTM_FAST 1 -#define CONFIG_WPA_MBEDTLS_CRYPTO 1 - -/* List of deprecated options */ -#ifdef CONFIG_ESP_CONSOLE_UART -#define CONFIG_CONSOLE_UART CONFIG_ESP_CONSOLE_UART -#endif - -#ifdef CONFIG_ESP_CONSOLE_UART_BAUDRATE -#define CONFIG_CONSOLE_UART_BAUDRATE CONFIG_ESP_CONSOLE_UART_BAUDRATE -#endif - -#ifdef CONFIG_ESP_CONSOLE_UART_CUSTOM -#define CONFIG_CONSOLE_UART_CUSTOM CONFIG_ESP_CONSOLE_UART_CUSTOM -#endif - -#ifdef CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0 -#define CONFIG_CONSOLE_UART_CUSTOM_NUM_0 CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0 -#endif - -#ifdef CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 -#define CONFIG_CONSOLE_UART_CUSTOM_NUM_1 CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 -#endif - -#ifdef CONFIG_ESP_CONSOLE_UART_DEFAULT -#define CONFIG_CONSOLE_UART_DEFAULT CONFIG_ESP_CONSOLE_UART_DEFAULT -#endif - -#ifdef CONFIG_ESP_CONSOLE_UART_NONE -#define CONFIG_CONSOLE_UART_NONE CONFIG_ESP_CONSOLE_UART_NONE -#endif - -#ifdef CONFIG_ESP_CONSOLE_UART_NUM -#define CONFIG_CONSOLE_UART_NUM CONFIG_ESP_CONSOLE_UART_NUM -#endif - -#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS -#define CONFIG_CXX_EXCEPTIONS CONFIG_COMPILER_CXX_EXCEPTIONS -#endif - -#ifdef CONFIG_PTHREAD_DEFAULT_CORE_0 -#define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 CONFIG_PTHREAD_DEFAULT_CORE_0 -#endif - -#ifdef CONFIG_PTHREAD_DEFAULT_CORE_1 -#define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 CONFIG_PTHREAD_DEFAULT_CORE_1 -#endif - -#ifdef CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY -#define CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY -#endif - -#ifdef CONFIG_PTHREAD_STACK_MIN -#define CONFIG_ESP32_PTHREAD_STACK_MIN CONFIG_PTHREAD_STACK_MIN -#endif - -#ifdef CONFIG_PTHREAD_TASK_CORE_DEFAULT -#define CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT CONFIG_PTHREAD_TASK_CORE_DEFAULT -#endif - -#ifdef CONFIG_PTHREAD_TASK_NAME_DEFAULT -#define CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT CONFIG_PTHREAD_TASK_NAME_DEFAULT -#endif - -#ifdef CONFIG_PTHREAD_TASK_PRIO_DEFAULT -#define CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT CONFIG_PTHREAD_TASK_PRIO_DEFAULT -#endif - -#ifdef CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT -#define CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT -#endif - -#ifdef CONFIG_LWIP_ESP_GRATUITOUS_ARP -#define CONFIG_ESP_GRATUITOUS_ARP CONFIG_LWIP_ESP_GRATUITOUS_ARP -#endif - -#ifdef CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES -#define CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES -#endif - -#ifdef CONFIG_ESPTOOLPY_FLASHMODE_DIO -#define CONFIG_FLASHMODE_DIO CONFIG_ESPTOOLPY_FLASHMODE_DIO -#endif - -#ifdef CONFIG_ESPTOOLPY_FLASHMODE_DOUT -#define CONFIG_FLASHMODE_DOUT CONFIG_ESPTOOLPY_FLASHMODE_DOUT -#endif - -#ifdef CONFIG_ESPTOOLPY_FLASHMODE_QIO -#define CONFIG_FLASHMODE_QIO CONFIG_ESPTOOLPY_FLASHMODE_QIO -#endif - -#ifdef CONFIG_ESPTOOLPY_FLASHMODE_QOUT -#define CONFIG_FLASHMODE_QOUT CONFIG_ESPTOOLPY_FLASHMODE_QOUT -#endif - -#ifdef CONFIG_LWIP_GARP_TMR_INTERVAL -#define CONFIG_GARP_TMR_INTERVAL CONFIG_LWIP_GARP_TMR_INTERVAL -#endif - -#ifdef CONFIG_LWIP_L2_TO_L3_COPY -#define CONFIG_L2_TO_L3_COPY CONFIG_LWIP_L2_TO_L3_COPY -#endif - -#ifdef CONFIG_ESP_MAIN_TASK_STACK_SIZE -#define CONFIG_MAIN_TASK_STACK_SIZE CONFIG_ESP_MAIN_TASK_STACK_SIZE -#endif - -#ifdef CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES -#define CONFIG_MAKE_WARN_UNDEFINED_VARIABLES CONFIG_SDK_MAKE_WARN_UNDEFINED_VARIABLES -#endif - -#ifdef CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE -#define CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE -#endif - -#ifdef CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT -#define CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT -#endif - -#ifdef CONFIG_FMB_CONTROLLER_SLAVE_ID -#define CONFIG_MB_CONTROLLER_SLAVE_ID CONFIG_FMB_CONTROLLER_SLAVE_ID -#endif - -#ifdef CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT -#define CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT -#endif - -#ifdef CONFIG_FMB_CONTROLLER_STACK_SIZE -#define CONFIG_MB_CONTROLLER_STACK_SIZE CONFIG_FMB_CONTROLLER_STACK_SIZE -#endif - -#ifdef CONFIG_FMB_EVENT_QUEUE_TIMEOUT -#define CONFIG_MB_EVENT_QUEUE_TIMEOUT CONFIG_FMB_EVENT_QUEUE_TIMEOUT -#endif - -#ifdef CONFIG_FMB_MASTER_DELAY_MS_CONVERT -#define CONFIG_MB_MASTER_DELAY_MS_CONVERT CONFIG_FMB_MASTER_DELAY_MS_CONVERT -#endif - -#ifdef CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND -#define CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND -#endif - -#ifdef CONFIG_FMB_QUEUE_LENGTH -#define CONFIG_MB_QUEUE_LENGTH CONFIG_FMB_QUEUE_LENGTH -#endif - -#ifdef CONFIG_FMB_SERIAL_BUF_SIZE -#define CONFIG_MB_SERIAL_BUF_SIZE CONFIG_FMB_SERIAL_BUF_SIZE -#endif - -#ifdef CONFIG_FMB_PORT_TASK_PRIO -#define CONFIG_MB_SERIAL_TASK_PRIO CONFIG_FMB_PORT_TASK_PRIO -#endif - -#ifdef CONFIG_FMB_PORT_TASK_STACK_SIZE -#define CONFIG_MB_SERIAL_TASK_STACK_SIZE CONFIG_FMB_PORT_TASK_STACK_SIZE -#endif - -#ifdef CONFIG_FMB_TIMER_GROUP -#define CONFIG_MB_TIMER_GROUP CONFIG_FMB_TIMER_GROUP -#endif - -#ifdef CONFIG_FMB_TIMER_INDEX -#define CONFIG_MB_TIMER_INDEX CONFIG_FMB_TIMER_INDEX -#endif - -#ifdef CONFIG_FMB_TIMER_PORT_ENABLED -#define CONFIG_MB_TIMER_PORT_ENABLED CONFIG_FMB_TIMER_PORT_ENABLED -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD -#define CONFIG_MONITOR_BAUD CONFIG_ESPTOOLPY_MONITOR_BAUD -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B -#define CONFIG_MONITOR_BAUD_115200B CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B -#define CONFIG_MONITOR_BAUD_230400B CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB -#define CONFIG_MONITOR_BAUD_2MB CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B -#define CONFIG_MONITOR_BAUD_57600B CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_74880B -#define CONFIG_MONITOR_BAUD_74880B CONFIG_ESPTOOLPY_MONITOR_BAUD_74880B -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B -#define CONFIG_MONITOR_BAUD_921600B CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B -#define CONFIG_MONITOR_BAUD_9600B CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER -#define CONFIG_MONITOR_BAUD_OTHER CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER -#endif - -#ifdef CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL -#define CONFIG_MONITOR_BAUD_OTHER_VAL CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL -#endif - -#ifdef CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE -#define CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE -#endif - -#ifdef CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE -#define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE -#endif - -#ifdef CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT -#define CONFIG_OPTIMIZATION_ASSERTIONS_SILENT CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT -#endif - -#ifdef CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL -#define CONFIG_OPTIMIZATION_ASSERTION_LEVEL CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL -#endif - -#ifdef CONFIG_COMPILER_OPTIMIZATION -#define CONFIG_OPTIMIZATION_COMPILER CONFIG_COMPILER_OPTIMIZATION -#endif - -#ifdef CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG -#define CONFIG_OPTIMIZATION_LEVEL_DEBUG CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG -#endif - -#ifdef CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE -#define CONFIG_OPTIMIZATION_LEVEL_RELEASE CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE -#endif - -#ifdef CONFIG_LWIP_PPP_CHAP_SUPPORT -#define CONFIG_PPP_CHAP_SUPPORT CONFIG_LWIP_PPP_CHAP_SUPPORT -#endif - -#ifdef CONFIG_LWIP_PPP_DEBUG_ON -#define CONFIG_PPP_DEBUG_ON CONFIG_LWIP_PPP_DEBUG_ON -#endif - -#ifdef CONFIG_LWIP_PPP_MPPE_SUPPORT -#define CONFIG_PPP_MPPE_SUPPORT CONFIG_LWIP_PPP_MPPE_SUPPORT -#endif - -#ifdef CONFIG_LWIP_PPP_MSCHAP_SUPPORT -#define CONFIG_PPP_MSCHAP_SUPPORT CONFIG_LWIP_PPP_MSCHAP_SUPPORT -#endif - -#ifdef CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT -#define CONFIG_PPP_NOTIFY_PHASE_SUPPORT CONFIG_LWIP_PPP_NOTIFY_PHASE_SUPPORT -#endif - -#ifdef CONFIG_LWIP_PPP_PAP_SUPPORT -#define CONFIG_PPP_PAP_SUPPORT CONFIG_LWIP_PPP_PAP_SUPPORT -#endif - -#ifdef CONFIG_LWIP_PPP_SUPPORT -#define CONFIG_PPP_SUPPORT CONFIG_LWIP_PPP_SUPPORT -#endif - -#ifdef CONFIG_COMPILER_STACK_CHECK -#define CONFIG_STACK_CHECK CONFIG_COMPILER_STACK_CHECK -#endif - -#ifdef CONFIG_COMPILER_STACK_CHECK_MODE_ALL -#define CONFIG_STACK_CHECK_ALL CONFIG_COMPILER_STACK_CHECK_MODE_ALL -#endif - -#ifdef CONFIG_COMPILER_STACK_CHECK_MODE -#define CONFIG_STACK_CHECK_MODE CONFIG_COMPILER_STACK_CHECK_MODE -#endif - -#ifdef CONFIG_COMPILER_STACK_CHECK_MODE_NONE -#define CONFIG_STACK_CHECK_NONE CONFIG_COMPILER_STACK_CHECK_MODE_NONE -#endif - -#ifdef CONFIG_COMPILER_STACK_CHECK_MODE_NORM -#define CONFIG_STACK_CHECK_NORM CONFIG_COMPILER_STACK_CHECK_MODE_NORM -#endif - -#ifdef CONFIG_COMPILER_STACK_CHECK_MODE_STRONG -#define CONFIG_STACK_CHECK_STRONG CONFIG_COMPILER_STACK_CHECK_MODE_STRONG -#endif - -#ifdef CONFIG_VFS_SUPPORT_TERMIOS -#define CONFIG_SUPPORT_TERMIOS CONFIG_VFS_SUPPORT_TERMIOS -#endif - -#ifdef CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT -#define CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT -#endif - -#ifdef CONFIG_IDF_TARGET -#define CONFIG_TARGET_PLATFORM CONFIG_IDF_TARGET -#endif - -#ifdef CONFIG_ESP_TASK_WDT -#define CONFIG_TASK_WDT CONFIG_ESP_TASK_WDT -#endif - -#ifdef CONFIG_ESP_TASK_WDT_PANIC -#define CONFIG_TASK_WDT_PANIC CONFIG_ESP_TASK_WDT_PANIC -#endif - -#ifdef CONFIG_ESP_TASK_WDT_TIMEOUT_S -#define CONFIG_TASK_WDT_TIMEOUT_S CONFIG_ESP_TASK_WDT_TIMEOUT_S -#endif - -#ifdef CONFIG_LWIP_TCPIP_RECVMBOX_SIZE -#define CONFIG_TCPIP_RECVMBOX_SIZE CONFIG_LWIP_TCPIP_RECVMBOX_SIZE -#endif - -#ifdef CONFIG_LWIP_TCPIP_TASK_AFFINITY -#define CONFIG_TCPIP_TASK_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY -#endif - -#ifdef CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 -#define CONFIG_TCPIP_TASK_AFFINITY_CPU0 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 -#endif - -#ifdef CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 -#define CONFIG_TCPIP_TASK_AFFINITY_CPU1 CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 -#endif - -#ifdef CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY -#define CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY -#endif - -#ifdef CONFIG_LWIP_TCPIP_TASK_STACK_SIZE -#define CONFIG_TCPIP_TASK_STACK_SIZE CONFIG_LWIP_TCPIP_TASK_STACK_SIZE -#endif - -#ifdef CONFIG_LWIP_TCP_MAXRTX -#define CONFIG_TCP_MAXRTX CONFIG_LWIP_TCP_MAXRTX -#endif - -#ifdef CONFIG_LWIP_TCP_MSL -#define CONFIG_TCP_MSL CONFIG_LWIP_TCP_MSL -#endif - -#ifdef CONFIG_LWIP_TCP_MSS -#define CONFIG_TCP_MSS CONFIG_LWIP_TCP_MSS -#endif - -#ifdef CONFIG_LWIP_TCP_OVERSIZE -#define CONFIG_TCP_OVERSIZE CONFIG_LWIP_TCP_OVERSIZE -#endif - -#ifdef CONFIG_LWIP_TCP_OVERSIZE_DISABLE -#define CONFIG_TCP_OVERSIZE_DISABLE CONFIG_LWIP_TCP_OVERSIZE_DISABLE -#endif - -#ifdef CONFIG_LWIP_TCP_OVERSIZE_MSS -#define CONFIG_TCP_OVERSIZE_MSS CONFIG_LWIP_TCP_OVERSIZE_MSS -#endif - -#ifdef CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS -#define CONFIG_TCP_OVERSIZE_QUARTER_MSS CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS -#endif - -#ifdef CONFIG_LWIP_TCP_QUEUE_OOSEQ -#define CONFIG_TCP_QUEUE_OOSEQ CONFIG_LWIP_TCP_QUEUE_OOSEQ -#endif - -#ifdef CONFIG_LWIP_TCP_RECVMBOX_SIZE -#define CONFIG_TCP_RECVMBOX_SIZE CONFIG_LWIP_TCP_RECVMBOX_SIZE -#endif - -#ifdef CONFIG_LWIP_TCP_SND_BUF_DEFAULT -#define CONFIG_TCP_SND_BUF_DEFAULT CONFIG_LWIP_TCP_SND_BUF_DEFAULT -#endif - -#ifdef CONFIG_LWIP_TCP_SYNMAXRTX -#define CONFIG_TCP_SYNMAXRTX CONFIG_LWIP_TCP_SYNMAXRTX -#endif - -#ifdef CONFIG_LWIP_TCP_WND_DEFAULT -#define CONFIG_TCP_WND_DEFAULT CONFIG_LWIP_TCP_WND_DEFAULT -#endif - -#ifdef CONFIG_SDK_TOOLPREFIX -#define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX -#endif - -#ifdef CONFIG_ESP_UART0_SWAP_IO -#define CONFIG_UART0_SWAP_IO CONFIG_ESP_UART0_SWAP_IO -#endif - -#ifdef CONFIG_LWIP_UDP_RECVMBOX_SIZE -#define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE -#endif - -#ifdef CONFIG_LWIP_USE_ONLY_LWIP_SELECT -#define CONFIG_USE_ONLY_LWIP_SELECT CONFIG_LWIP_USE_ONLY_LWIP_SELECT -#endif - -#ifdef CONFIG_COMPILER_WARN_WRITE_STRINGS -#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS -#endif - From da3e4af9f227000ea32f0b85ebc26a4a8f17096e Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Sun, 13 Oct 2024 14:51:02 +0200 Subject: [PATCH 5/5] track uptime --- embadet/main/apple.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/embadet/main/apple.c b/embadet/main/apple.c index 38c86dc..a113bcd 100644 --- a/embadet/main/apple.c +++ b/embadet/main/apple.c @@ -6,6 +6,7 @@ #include // Die Header-Datei mit DS18B20-Funktionen #include #include +#include struct appldata; /* @@ -21,6 +22,8 @@ int app_main() { // Variable to store the MAC address uint8_t baseMac[6]; + + long uptime = (xTaskGetTickCount() * (1000/configTICK_RATE_HZ)); // Get MAC address of the WiFi station interface esp_read_mac(baseMac, ESP_MAC_WIFI_STA); @@ -30,6 +33,8 @@ int app_main() { } printf("%02X\n", baseMac[5]); + printf( "Uptime = %d\n", (xTaskGetTickCount() * (1000/configTICK_RATE_HZ))); + @@ -50,7 +55,8 @@ int app_main() { temp = ds18b20_read_temp(&sensor); vTaskDelay(5000 / portTICK_PERIOD_MS); printf("\n"); - printf( "Temperature = %.4f", temp); + printf( "Temperature = %.4f\n", temp); + printf( "Uptime = %d", (xTaskGetTickCount() * (1000/configTICK_RATE_HZ))); }; // Print temperature with 4 decimal places