esp-idf/examples/peripherals
Ivan Grokhotkov ecee175962 Merge branch 'bugfix/nvs_init_check_empty_pages' into 'master'
Error handling in NVS initialization

Previously nvs_flash_init worked under an assumption that there should always be at least one free page available. This is true during normal operation, but in some cases (such as when changing application partition table from a non-OTA to an OTA one), NVS partition may get truncated, which will cause empty pages to be lost.

This MR adds error checks for this condition, and updates code which calls `nvs_flash_init` to check for the return code.
For most examples, a simple `ESP_ERROR_CHECK` is added around `nvs_flash_init`. For NVS examples and the OTA example, more robust error handling is added.

This change also removes nvs_flash_init calls from examples which don't use NVS.

See merge request !582
2017-03-23 17:57:15 +08:00
..
adc add adc1 example 2017-03-20 14:46:41 +08:00
gpio Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
i2c Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
i2s examples: remove nvs_flash_init from examples which do not use NVS 2017-03-14 22:03:40 +08:00
ledc Feature: add ledc low speed channels 2017-03-17 17:26:30 +08:00
pcnt Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
rmt_nec_tx_rx Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
sigmadelta Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
spi_master Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
timer_group Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
touch_pad_interrupt examples: remove nvs_flash_init from examples which do not use NVS 2017-03-14 22:03:40 +08:00
touch_pad_read examples: remove nvs_flash_init from examples which do not use NVS 2017-03-14 22:03:40 +08:00
uart Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00
README.md Added README.md to example category folders 2017-01-18 21:03:15 +01:00

Peripherals Examples

This section provides examples how to configure and use ESP32s internal peripherals like GPIO, UART, I2C, SPI, timers, counters, ADC / DAC, PWM, etc.

See the README.md file in the upper level examples directory for more information about examples.