Commit graph

255 commits

Author SHA1 Message Date
island
a4f3312d9d bt component: optimize scan feature
1. Add advertising data length and scan response length in scan result
2. Add scan continuously feature
3. Fix non connectable adv topology error
4. Increase BTC queue size
2017-04-11 14:20:20 +08:00
Tian Hao
d90a35af19 component/bt : modify bluetooth config style 2017-04-06 11:35:53 +08:00
Tian Hao
f5ebeb4c4d component/bt : add uart(1/2) as HCI IO directly 2017-04-05 21:23:42 +08:00
Angus Gratton
40a35db784 Merge branch 'bugfix/example_naming' into 'master'
examples: Standardise naming of files, symbols, etc. in examples

* Use "example" in all example function & variable names,
  ie use i2c_example_xxx instead of i2c_xxx for example functions.
  Closes #198 https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation

See merge request !601
2017-03-29 08:50:49 +08:00
Angus Gratton
821c70f5d7 examples: Standardise naming of files, symbols, etc. in examples
* Use "example" in all example function & variable names,
  ie use i2c_example_xxx instead of i2c_xxx for example functions.
  Closes #198 https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation
2017-03-27 17:42:05 +11:00
Dmitry Yakovlev
a6e4e89592 ulp: add build system integration and example 2017-03-27 12:41:00 +08:00
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
Ivan Grokhotkov
9254d2846f Merge branch 'feature/ledc_low_speed_channels' into 'master'
add ledc low speed channels

1. add low speed channels
2. modify example code.

See merge request !490
2017-03-21 15:35:40 +08:00
Chu Shu Chen
bab7a2df80 add adc1 example 2017-03-20 14:46:41 +08:00
Wangjialin
7670e93639 Feature: add ledc low speed channels
1. Add low speed channels for LEDC module.
2. Improve fade object allocate mechanism.
3. Improve ledc example, add 2 low speed channels in example.
4. Remove debug code
5. Improve the register bit field name of slow clock.
2017-03-17 17:26:30 +08:00
Ivan Grokhotkov
4813ab2d28 examples: check return value of nvs_flash_init
nvs_flash_init may return an error code in some cases, and applications
should check this error code (or at least assert on it being ESP_OK, to
make potential issues more immediately obvious).

This change modifies all the examples which use NVS to check the error
code. Most examples get a simple ESP_ERROR_CHECK assert, while NVS
examples, OTA example, and NVS unit tests get a more verbose check which
may be used in real applications.
2017-03-15 10:44:54 +08:00
Ivan Grokhotkov
f59f13efd5 examples: remove nvs_flash_init from examples which do not use NVS 2017-03-14 22:03:40 +08:00
Angus Gratton
2156408d45 Merge branch 'feature/aws_iot_sdk' into 'master'
Amazon AWS IoT SDK

Amazon IoT SDK component, plus two examples derived from their Linux samples.


See merge request !132
2017-03-14 10:21:08 +08:00
Angus Gratton
da660b234c AWS IoT Device SDK Support
Use device cert/key embedded in firmware, or loaded from filesystem.
2017-03-13 17:23:29 +08:00
Ivan Grokhotkov
66c693eebb Merge branch 'feature/deep_sleep_wakeup_from_touch' into 'master'
add wakeup from touch sensor, and deep sleep example

- add new deep sleep wakeup mode
- change documentation to explain incompatibilities between different wakeup mode, add error checks
- add new ULP instructions necessary for ULP wakeup scenario
- fix issues with I_WR_REG, I_SLEEP, I_END instructions
- add deep sleep example, illustrating the use of timer, gpio, touch, and ULP wakeup triggers

See merge request !461
2017-03-08 14:27:58 +08:00
Angus Gratton
a35d5e3a3a Merge branch 'feature/touch_pad_examples' into 'master'
Examples on using capacitive touch sensors

- `touch_pad_read` - read sensor values  and show on terminal
- `touch_pad_interrupt` - perform simple calibration; trigger an interrupt when any pad is touched


See merge request !530
2017-03-07 09:03:11 +08:00
Angus Gratton
0b7058d8ef mbedTLS: Add generic support for mbedTLS debug output via the esp_log functionality 2017-03-07 10:18:47 +11:00
Angus Gratton
9f7d8c338e Merge branch 'feature/esptool_espefuse_set_flash_voltage' into 'master'
esptool version bump and new "espefuse.py set_flash voltage" command

* New "espefuse.py set_flash_voltage" command to easily set a fix
  VDD_SDIO regulator voltage (1.8V, 3.3V or disabled).
* Fixes bugs when flashing files with non-4-byte aligned lengths
  (doesn't effect esp-idf image files)
* esptool README improvements
* Detect overlapping files in write_flash
* read_mac now works correctly on ESP32
* Integrates reset fix for older dev boards (formerly the "Windows ESP32R0 reset workaround")


See merge request !481
2017-03-07 07:08:18 +08:00
Krzysztof
41890f15b9 - examples: add 'Capacitive touch sensor read' example
- examples: add 'Capacitive touch sensor interrupts' example
- Code review comments implemented
- use only one image
- add external picture of ESP32 Demo Board V2
2017-03-06 21:25:54 +01:00
Angus Gratton
975be7a2c9 Merge branch 'bugfix/github_small_fixes' into 'master'
Merge small bugfix PRs from github

* https://github.com/espressif/esp-idf/pull/389
* https://github.com/espressif/esp-idf/pull/382
* https://github.com/espressif/esp-idf/pull/367
* https://github.com/espressif/esp-idf/pull/366
* https://github.com/espressif/esp-idf/pull/361
* https://github.com/espressif/esp-idf/pull/355
* https://github.com/espressif/esp-idf/pull/350
* https://github.com/espressif/esp-idf/pull/348
* https://github.com/espressif/esp-idf/pull/339
* https://github.com/espressif/esp-idf/pull/46
* https://github.com/espressif/esp-idf/pull/307



See merge request !541
2017-03-03 12:58:22 +08:00
Angus Gratton
5ea9097dbd esptool: Update to latest v2.0 beta version
* New "espefuse.py set_flash_voltage" command to easily set a fix
  VDD_SDIO regulator voltage (1.8V, 3.3V or disabled).
* Fixes bugs when flashing files with non-4-byte aligned lengths
  (doesn't effect esp-idf image files)
* README improvements
2017-03-03 15:34:04 +11:00
rudi ;-)
f4c4787281 examples/ethernet: Same sense of meaning SW_STRAP
Merges #366 #367
https://github.com/espressif/esp-idf/pull/366
https://github.com/espressif/esp-idf/pull/367
2017-03-03 14:59:15 +11:00
rudi ;-)
e335f19a4d examples/ethernet: typo, better named
Merges #382 https://github.com/espressif/esp-idf/pull/382
2017-03-03 14:59:15 +11:00
Ivan Grokhotkov
7754647e71 Merge branch 'bugfix/separate_ethernet_and_wifi' into 'master'
Allow separate ethernet & wifi configuration

If only 1/2 of ethernet & WiFi are enabled in config, the other interface is no longer linked into the firmware.

* Fixes bug where enabling Ethernet but not WiFi would fail to compile.
* Also means that enabling WiFi but not Ethernet no longer links some unused ethernet interface functions.


See merge request !525
2017-03-03 11:53:32 +08:00
Ivan Grokhotkov
8911e666a0 Merge branch 'feature/docs_partition_ota_flash' into 'master'
Partition/SPI/OTA docs & OTA new functionality

* Update partition, SPI flash & OTA docs to reflect functionality changes
* Refactor OTA implementation to perform checks mentioned in API doc
* Add new functions to OTA API: esp_ota_get_running_partition() & esp_ota_get_next_update_partition() functions
* Add spi_flash_cache2phys() & spi_flash_phys2cache() functions to support esp_ota_get_running_partition()


See merge request !513
2017-03-03 11:27:01 +08:00
Angus Gratton
fd0edae75a ethernet example: Disable WiFi, enable Ethernet in default config
Ref: https://esp32.com/viewtopic.php?f=2&t=1249
2017-02-24 14:56:29 +11:00
Tian Hao
b582697889 component/bt : add adv/scan start complete event
1. indicate adv/scan start complete success or failed
2. controller do limit of adv/scan concurrence, so add some codes to report adv/scan start failed or not.
2017-02-23 17:54:22 +08:00
Ivan Grokhotkov
4af5f572f4 add deep sleep wake up example 2017-02-22 18:40:31 +08:00
Angus Gratton
25f739c183 ota ops: Add new functions esp_ota_get_next_update_partition / esp_ota_get_running_partition
* Update OTA example to use these.
* Refactor esp_ota_begin() to return ESP_ERR_OTA_PARTITION_CONFLICT as documented
2017-02-22 10:24:42 +11:00
Ivan Grokhotkov
26dec992eb deep sleep: add note about disabling WiFi and BT
This change adds a note to esp_deep_sleep that applications should disable WiFi and BT before going into deep sleep.
SNTP example is also updated.
2017-02-21 17:07:16 +08:00
Tian Hao
4bd5b0c91a component/bt : add bt enable/disable for power save
1. add new APIs bt controller enable/disab/deinit
2. make bt controller work need to call two APIs of esp_bt_controller_init and enable
3. modify phy init to make mac reset once
2017-02-17 19:24:58 +08:00
Jiang Jiang Jian
6c139c8ffb Merge branch 'feature/ethernet_phy_power' into 'master'
ethernet: add a gpio to enable/disable phy power

ethernet board v2 use gpio 17 .

See merge request !495
2017-02-16 15:12:09 +08:00
shangke
2fc4413dae ethernet: add pin macro 2017-02-16 14:36:46 +08:00
Ivan Grokhotkov
34d0b0086e Merge branch 'bugfix/openssl_server_example' into 'master'
Example 10_openssl_server should use TLSv1.2 instead of SSLv3; fixed corrupted HTTP Header

* Merges github PR #214 https://github.com/espressif/esp-idf/pull/214
* Closes #333 https://github.com/espressif/esp-idf/issues/333

See merge request !501
2017-02-15 14:34:08 +08:00
Angus Gratton
39c546d63f openssl_server example: Roll back to TLS_server_method() for compatibility
Add a comment recommending TLS v1.2.
2017-02-15 17:19:09 +11:00
Ivan Grokhotkov
25f05bef71 Merge branch 'bugfix/OTA_and_flash_encryption_incompatible' into 'master'
bootloader_support: fix bug OTA & flash encryption incompatible

github issue:https://github.com/espressif/esp-idf/issues/253

See merge request !464
2017-02-15 13:24:10 +08:00
Malte Janduda
dcd5c5bb73 Example 10_openssl_server should use TLSv1.2 instead of SSLv3; fixed corrupted HTTP Header 2017-02-14 15:38:37 +11:00
shangke
9893b71096 ethernet: add a gpio to enable/disable phy power 2017-02-11 15:19:53 +08:00
Tian Hao
cf917567e9 component/bt : use real adv data to set raw adv data 2017-02-10 16:40:40 +08:00
Angus Gratton
eea2788f5a OTA: Fix issues with encrypted OTA
- OTA source can write non-16-byte multiples of data
- Assumption that empty ota_data is 0xFFFFFFFF untrue when encrypted
2017-01-26 18:52:35 +11:00
Angus Gratton
67336672bd OTA: Improve verification of OTA image before writing, incl. secure boot
Verify 0xE9 magic byte on first write, verify entire image before
switching.

Enable verification for secure boot signature (was using invalid ifdef
guard)
2017-01-26 16:20:06 +11:00
Mike Ryan
74aff89918 gatts_demo: re-enter advertising after client disconnects
In the existing tree, after a connected client disconnects the device
will never re-enter the advertising state. Additional clients will not
be able to discover or connect to the device. This patch forces the
device back into the advertising state upon disconnection.

Resolves Pull Request #217 https://github.com/espressif/esp-idf/pull/217
2017-01-20 14:57:41 +11:00
Jiang Jiang Jian
aea18f6e74 Merge branch 'feature/btdm_raw_adv' into 'master'
Feature/btdm raw adv

Add APIs to set raw advertising data and scan response data by user self.

See merge request !451
2017-01-19 18:57:39 +08:00
Tian Hao
0073ff3acd component/bt : add api to set raw adv_data/scan_rsp_data
1. add api to set raw scan response data
2. add api to set raw scan response data
3. update doxygen
4. add menuconfig to config gatt server demo
2017-01-19 17:36:40 +08:00
krzychb
16b23a407c Added links from api category TOC to example category folders
Typo fix in bluetooth README.md
2017-01-18 21:21:02 +01:00
krzychb
0b6598c492 Added README.md to example category folders 2017-01-18 21:03:15 +01:00
Ivan Grokhotkov
30c2fca25a Merge branch 'bugfix/docs_cleanup' into 'master'
Organize examples and API documentation - supplement to !430

This supplement to !430, both intended to replace bulky  !421.

1. Fixed broken links
2. Added links to available examples in API documentation, where missing
3. Updated links to point directly to example folder (to show README.md with example description)
4. Added README.md in docs folder info to point reader to ReadTheDocs instead of doc sources, ref. https://github.com/espressif/esp-idf/issues/243
5. Fixed some typo errors / Sphinx warnings
6. Fixed memory leak in example, ref. https://github.com/espressif/esp-idf/issues/209


See merge request !440
2017-01-19 00:33:31 +08:00
krzychb
8aa5082baa Fixed memory leak in example, ref. https://github.com/espressif/esp-idf/issues/209 2017-01-17 21:20:24 +01:00
krzychb
66647bb5bd Typo corrections 2017-01-17 21:12:54 +01:00
Tian Hao
5508826509 component/bt : fix gatts demo mistakes & unpeg notify bug 2017-01-17 20:13:25 +08:00