Commit graph

252 commits

Author SHA1 Message Date
Ivan Grokhotkov
a2ace698ed sdmmc: fix explanation of flash voltage regulator configuration efuses
- low level on GPIO12 corresponds to 3.3V output, not 1.8V
- add espefuse.py commands to burn efuses
- add XPD_SDIO_REG to the list of efuses which must be set

Reported on the forum: http://esp32.com/viewtopic.php?f=2&t=849&start=10#p4170
2017-01-16 02:38:31 +08:00
me-no-dev
dd3f18d2d8 Initial mDNS component and example 2017-01-13 12:12:43 +02:00
Wu Jian Gang
ad1790fe3e Merge branch 'feature/btdm_attr_table' into 'master'
component bt:Added the create attribute table method to the new API

GATT Server service table APIs.
Have already modify the style and other things as @jeroen  suggestion in other MR(the MR have been closed)

See merge request !399
2017-01-12 17:31:39 +08:00
Tian Hao
142756615b component/bt : mv demo name
1. mv demo name
2. fix a docs
2017-01-12 14:44:26 +08:00
Jiang Jiang Jian
2126f6c8b7 Merge branch 'feature/wpa2_example' into 'master'
wpa2 enterprise: add example for wpa2 enterprise



See merge request !410
2017-01-12 11:49:52 +08:00
Island
9f151d745e component/bt : Optimize Gatt attr table and fix some bugs
1. Optimize GATT attribute table structure
2. fix read/write bugs
3. add docs
2017-01-12 11:49:15 +08:00
XiaXiaotian
ff4a5a1406 wpa2 enterprise: add example for wpa2 enterprise 2017-01-11 21:56:17 +08:00
Ivan Grokhotkov
5fbea86a9e Merge branch 'feature/config_wifi_bt' into 'master'
Clean up WiFi & Bluetooth config options

* Splits "WiFi" configuration out from ESP32 configuration submenu to its own menu.
* Renames "BT" to "Bluetooth", enabling Bluetooth is now in this option not the ESP32 submenu.

* Also disables compiling/linking of BT stack if Bluetooth is disabled, saves some build time.

See merge request !397
2017-01-11 18:38:30 +08:00
Jeroen Domburg
8a2ff5a16d Merge branch 'bugfix/spi_inconsistencies' into 'master'
SPI: Some fixes to docs and flag naming

Kolban noticed the flags for a transaction are not named like the documentation states. The flags as mentioned in the docs are more consistent, so this MR renames them to that. Also some additions to the docs wrt the SPI signals

Ref http://www.esp32.com/viewtopic.php?f=13&t=919&p=3976#p3976 and http://www.esp32.com/viewtopic.php?f=13&t=921&p=3975#p3975

See merge request !398
2017-01-11 17:11:45 +08:00
Yulong
d512d6100c component bt:Added the create attribute table method to the new API 2017-01-11 16:57:19 +08:00
Jeroen Domburg
ee59fa75f4 Rename SPI Master IO pins to more common terminology, add better explanation to queue_length initialization value 2017-01-11 11:25:56 +08:00
shangke
0e701e1cac ethernet: support flow control 2017-01-10 15:19:18 +08:00
Jeroen Domburg
5eb8eb3855 SPI master: rename transaction flags from SPI_* to SPI_TRANS_*, like the documentation says. Also add some explanation about the SPI signals in the documentation 2017-01-10 14:41:12 +08:00
Angus Gratton
2e78b397bc config: Simplify WiFi & Bluetooth config options
Removes redundant menu options, splits WiFi configuration out from
generic ESP32 configuration.
2017-01-10 16:04:04 +11:00
Wu Jian Gang
fb70126bc8 Merge branch 'feature/openssl' into 'master'
examples/10_openssl_server: fixup SSL server with method of specific version

1. add method of any version supporting at OpenSSL and add API in header file
2. change OpenSSL server context method to be method of any version

Fixes http://esp32.com/viewtopic.php?f=14&t=696.

See merge request !369
2017-01-10 12:01:40 +08:00
Jiang Jiang Jian
0106feeeda Merge branch 'feature/btdm_common_api' into 'master'
component/bt : add bt device api

1. add get bd_addr function

later, will add other functions reference with bluetooth device.

See merge request !380
2017-01-09 11:33:57 +08:00
Ivan Grokhotkov
edd924f273 sdmmc: add peripheral driver and protocol layer 2017-01-09 04:51:24 +08:00
Wu Jian Gang
1b9f477b15 example: Reindex ota demo 2017-01-07 15:39:22 +08:00
Wu Jian Gang
ed01eb2df1 example: fix CI error of ota demo 2017-01-07 15:39:22 +08:00
Wu Jian Gang
4491dd0e2a example: fix CI error of coap server demo 2017-01-07 15:39:18 +08:00
Wu Jian Gang
6ca2934843 example: fix CI error of coap client demo 2017-01-07 15:39:12 +08:00
Tian Hao
9c630b759f component/bt : add bt device api
1. add get bd_addr function
2017-01-06 21:19:58 +08:00
Jiang Jiang Jian
f5b221b9fb Merge branch 'feature/btdm_blufi_version' into 'master'
component/bt : blufi add version

blufi add version and the android APK add version check, too.

See merge request !378
2017-01-06 18:55:05 +08:00
Tian Hao
e4b9563dac component/bt : blufi add version 2017-01-06 17:40:46 +08:00
Jeroen Domburg
718969f6ed Merge branch 'driver/spi' into 'master'
SPI master driver

This merge requests adds an SPI Master driver. This driver is (of course) multithread capable, has device abstraction, has command queueing, DMA support and all other sorts of nice things you'd expect from a SPI driver.


See merge request !332
2017-01-06 16:28:52 +08:00
Wu Jian Gang
e387a16e51 Merge branch 'feature/Add_OTA_Demo' into 'master'
esp32 examples: Add OTA Demo

this demo would show you an OTA workflow and how to make it run.

See merge request !324
2017-01-06 16:15:14 +08:00
Wu Jian Gang
c943fabcda Merge branch 'feature/CoAP' into 'master'
Add CoAP feature

Add CoAP protocol, support client and server test demo.

See merge request !303
2017-01-06 15:37:09 +08:00
Jeroen Domburg
23455de4c2 Add SPI Master driver, example, test and docs 2017-01-06 14:20:32 +08:00
Tian Hao
99d6984800 component/bt : blufi fix security init bug 2017-01-06 12:24:37 +08:00
Ivan Grokhotkov
ded13ac8e6 Merge branch 'feature/btdm_blufi' into 'master'
Feature/btdm blufi

This is new BLUFI for config wifi connection through bluetooth.


See merge request !359
2017-01-05 21:54:45 +08:00
Tian Hao
24af07fd13 component/bt : new blufi
1. new blufi protocol
2. new blufi demo
3. support security
4. support sta/ap/sta_ap
5. support wpa-enterprise
2017-01-05 20:22:35 +08:00
Wang Jia Lin
ad1d4500f9 Merge branch 'feature/ledc' into 'master'
driver: ledc update

1. add fading functions.
2. clear up ledc.h
3. update api doc.
4. add ledc example

See merge request !347
2017-01-05 20:05:13 +08:00
wangmengyang
2e7748d625 component/bt: modify bluetooth API
1. VHCI api and doxygen
2. Controller api and doxygen
3. bluedroid init/enable api and doxygen
4. cleanup demo codes
2017-01-05 20:02:06 +08:00
Wangjialin
6b5e734901 driver: ledc - update fading functions, add example and doc
1. add fading functions.
2. clear up ledc.c and ledc.h
3. update api doc.
4. add ledc example
5. edit ledc.rst and add readme for example code.
6. add s_ prefix for static global values.
7. add mutex for fade functions
8. minor changes according to the comments.
2017-01-05 17:57:52 +08:00
Tian Hao
d6fcec73b2 component/bt : add macro for adv_data_flag
1. add macro for adv data flag
2. add docs for doxygen
2017-01-05 17:53:33 +08:00
Tian Hao
daf58e3852 component/bt : fix advertising bug
1. adv data flag
2. default adv data not BR/EDR in demo
2017-01-05 17:53:33 +08:00
Dong Heng
8c7dfef317 examples/10_openssl_server: fixup SSL server with method of specific version
1. add method of any version supporting at OpenSSL and add API in header file
2. change OpenSSL server context method to be method of any version

Fixes http://esp32.com/viewtopic.php?f=14&t=696.
2017-01-05 15:57:25 +08:00
Liu Han
56514d5ab2 examples: Add CoAP client demo
Test CoAP protocol client
2017-01-05 15:49:21 +08:00
Liu Han
899f61f4a2 examples: Add CoAP server demo
Test CoAP protocol server
2017-01-05 15:49:14 +08:00
Tian Hao
ee318d42ae Merge branch 'master' into feature/btdm_gatt_api 2017-01-05 15:25:03 +08:00
Chen Wu
b1cac83f61 examples: Rename 18_ota to 26_ota
example numbers should accord with our internal definition.
2017-01-05 09:57:45 +08:00
Ivan Grokhotkov
6f578796d3 Merge branch 'bugfix/ci_build_example_failures' into 'master'
Fix CI build example not failing on errors



See merge request !357
2017-01-05 00:48:27 +08:00
Wangjialin
9c7cc86793 1. modify i2c_set_pin function
2. update example comments and other minor changes
3. rename API:  i2c_cmd_link_create/i2c_cmd_link_delete (+4 squashed commits)

Squashed commits:
[2e0ac3e] 1. coding style: add one space after condition key words.
2. modify i2c.h, use gpio_num_t instead of int, improve comments of return values
3. add i2c index in index.rst
4. add readme for i2c example
[4991d92] update i2c.doc
[88b672e] driver: i2c

1. add mux and spin lock to run in a thread-safe way.
2. modify example code
[4eb15fe] driver: i2c code

1. add i2c master code
2. add i2c slave code
3. add i2c example code
4. add DRAM_ATTR for I2C array
2017-01-03 00:57:19 +08:00
Angus Gratton
eb8324e2c2 examples: Fix build errors that weren't being caught by CI 2016-12-30 16:53:01 +11:00
Angus Gratton
2350288a33 examples: Move sdkconfig.defaults support into build system
Is used fairly widely, and a little bit buggy in the form
where it was in each Makefile (didn't always get copied in place).
2016-12-29 17:37:30 +08:00
Chen Wu
d0fccbce15 examples: Add OTA demo 2016-12-29 17:37:17 +08:00
Tuan PM
5462d98e5a Add i2s driver 2016-12-29 17:29:14 +08:00
Wangjialin
ade7ee2092 gpio_driver: add per-pin interrupt handlers
1. add ISR handler apis so that users of different layers can hook their own isr handler on different GPIO.
    Audio project has different software layers, they need different gpio isr handler for layer instead of processing all GPIO interrupts in one handler.
    If this kind of calling a handler from isr is not proper, please kindly point out.
2. add gpio example code.
3. improve gpio.rst
4. add readme for gpio example

Squashed commits:
[278e50f] update: GPIO
1. coding style, add a space between conditional or loop keyword and an opening paren.
2. modify some return value and doc
3. use printf in example code
Squashed commits:
[efb23bb] minor change of comment
2016-12-29 11:16:32 +08:00
Angus Gratton
3cfe738fcf Merge branch 'bugfix/minor_issues' into 'master'
Bugfixes from Github

Many small fixes for open github issues.

See merge request !334
2016-12-28 13:18:34 +08:00
Angus Gratton
06e03ff52e Replace backwards-compatible portTICK_RATE_MS with FreeRTOS v8+ portTICK_PERIOD_MS
Closes github #51 https://github.com/espressif/esp-idf/issues/51
2016-12-28 10:23:13 +11:00
shangke
5ddf6daa98 feature/ethernet_driver: update ethernet driver
1. The transmitting mode of the packets from LWIP to MAC is changed from synchronous to asynchronous.
2. The receive buf mode : support pointer mode and copy mode.
3. Add get phy status func used to config mac register.
2016-12-26 14:50:49 +08:00
Angus Gratton
2f9772860a Examples: Add READMEs for examples which did not have them
Closes github #128 https://github.com/espressif/esp-idf/issues/128
2016-12-22 15:07:02 +11:00
Wangjialin
9dbdab5c9a driver: uart
1. add uart rx buffer data length API
2. add uart pattern detect event
3. add uart example code
4. modify uart_isr_register
5. modify uart.rst
6. fix parity err event and frame err event.
2016-12-21 11:55:53 +08:00
Jeroen Domburg
99849ca2cc Fix timer example; it had too little stack resulting in a stack overflow 2016-12-19 18:48:08 +08:00
Tian Hao
65fe6ab320 component/bt : modify demo for new api
1. modify GATT Client demo
2. modify GATT Server demo
3. fix a register notify bug
2016-12-19 17:15:41 +08:00
Tian Hao
c01dedcb06 component/bt : change api for V2.0
1. change all gatt cb function to 3 args and function type. add gattc_if/gatts_if as second argument
2. delete gatt_if of "gatt cb param"
3. separate conn_id and gatt_if from conn_id
4. change the demo code as the gatt changed
2016-12-19 17:15:41 +08:00
Wangjialin
b00b75db7e driver: sigma-delta
1. add sigma-delta code and example.
2. add gpio output signal in io matrix.

Squashed commits:
[a25e7d4] minor changes for doc
[6a03a1e] minor changes on comments and doc.
[97dd9e4] Add doc.
update index.rst
change example index
2016-12-18 17:20:17 +08:00
Ivan Grokhotkov
88ddf5aefa deep sleep: rename header file 2016-12-16 14:30:27 +08:00
Tian Hao
5a2033c4e3 Merge branch 'master' into bugfix/btdm_bluedroid 2016-12-15 14:40:29 +08:00
Tian Hao
1be09039e3 component/bt : cleanup the un-necessary include in api.h
1. cleanup the un-necessary include in api.h for "extern c"
2. add UUID define
2016-12-09 14:38:21 +08:00
Jeroen Domburg
bf57594ebe Merge branch 'feature/intr_alloc' into 'master'
Add dynamic interrupt allocation mechanism

This adds:
- Dynamic allocation of interrupts. Pass it the features of the interrupt you want, it'll set you up with an int.
- Shared interrupts. Enables multiple peripheral drivers to use the same interrupt. 
- Marking what interrupts are fully executable from IRAM; if an int isn't marked like that it will get disabled once flash cache gets disabled.

Also:
- Modifies driver to be in line with these changes

See merge request !254
2016-12-09 14:00:39 +08:00
Angus Gratton
f68e1c22ab Merge branch 'bugfix/ci_fail_warnings' into 'master'
Fail CI build on warnings

This allows developers to add CFLAGS for -Wno-error=XXX while developing, but before code passes the CI build then it must be warning-free.

See merge request !279
2016-12-09 13:25:51 +08:00
Liu Han
d6ec6d1ae5 example/09_openssl_client: change default port to be 443 2016-12-08 20:28:45 +08:00
Liu Han
19a2ee3740 example/https_request: add header file declare platform.h of mbedtls 2016-12-08 15:03:38 +08:00
Jeroen Domburg
baa6a477c5 Fix example code, add chapter to docs about interrupts and multicore issues 2016-12-08 14:42:00 +08:00
Jeroen Domburg
2c34ab3374 Mark some interrupts that are now allocated dynamically as free, add int handle param documentation, add local ints test 2016-12-08 12:39:33 +08:00
Jeroen Domburg
655fd2986a Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts
to be marked specifically as having a handler that's all in IRAM.
2016-12-08 12:39:33 +08:00
Angus Gratton
cbc7d1814c pcnt example: Remove unused debugging tag 2016-12-07 14:16:05 -08:00
Tian Hao
c277735e6e component/bt : cleanup demo warnings 2016-12-07 13:49:53 -08:00
Tian Hao
5933ebc6b6 component/bt : cleanup all the "-W-no-xx" and all the warnings
1. cleanup the warnings.
2. fix the some function called in gap
3. fix some code in btc_main
2016-12-07 13:49:53 -08:00
Wu Jian Gang
667d0ef319 docs: fix example index 2016-12-02 16:02:20 +08:00
Jiang Jiang Jian
bd20288b81 Merge branch 'feature/btdm_bluedroid' into 'master'
Feature/btdm bluedroid

This branch contain the bluedroid host code.
Currently,  Only GAP/GATT SERVER/GATT CLIENT release to users.
Actually, the content of the codes is further more than GAP/GATT and etc.
In this release version, users only need to concern about the APIs which are in "api/include/".

Now, suggestions in comment have been resolved are following:
1. The APIs use callback function. Ivan , Jeroen and me have discussed it. Currently the code will not be changed.
2. The APIs use OPEN/CLOSE. I have ask Ivan, besides bluedroid do this, we will keep the name.
3. Coding style. I have run format.sh to handle the style. And some spell error have been fixed.
4. APIs doxygen. I have clean the warning by doxygen. But bt.rst is still need to be completed.
5. Other comment without resolved face to face that I have to add response in the comment and fix them in the code
6. Fix some incorrect things. See the git log for details.

This 1st version of bluedroid release still have lots of things to do. But it can be done after this merge.
1. Compelete the BLUFI(Bluetooth config wifi connection) documents, security, application protocol and other.
2. Add SPP-LIKE profile.
3. Do more examples codes to cover most of the APIs.
4. Test and fix bug.

Another thing:
1. Do the document of APIs.(xml->bt.rst->html) 
(I will do this before merge as Ivan's suggestion)
This is already done. Besides, the union type in doxygen have something error. Ivan will fix it.



See merge request !239
2016-12-02 12:07:20 +08:00
shangke
e0040af7e5 ethernet: add first version of ethernet driver 2016-12-01 19:17:48 +08:00
Tian Hao
a8dd1dfcf2 component/bt : remove sdp demo and add default sdkconfig of bt demos
1. remove sdp demo.
2. add sdkconfig.default for bt demos
2016-11-30 11:26:30 +08:00
Tian Hao
5a9801aca7 Merge branch 'master' into feature/btdm_bluedroid
# Conflicts:
#	components/esp32/cpu_freq.c
#	components/esp32/lib
2016-11-29 18:38:37 +08:00
Tian Hao
f6de7ea764 component/bt : cleanup status and spell check 2016-11-28 22:40:30 +08:00
Tian Hao
9d9e758756 component/bt : add comment for doxygen
1. use doxygen check api comment
2016-11-28 21:59:04 +08:00
Tian Hao
ff8ce12787 component/bt : cleanup the spell && redundant 2016-11-28 14:58:30 +08:00
Tian Hao
19273c7b2d component/bt : run astyle handle the code files 2016-11-25 02:10:15 +08:00
Tian Hao
d7eb709a9c component/bt : add license header 2016-11-25 01:58:26 +08:00
Wangjialin
a5ad8090cf Merge branch 'master' into driver_merge_tmp/merge_timer
# Conflicts:
#	docs/index.rst
2016-11-25 01:07:19 +08:00
Wang Jia Lin
35ae2cd1a5 Merge branch 'driver_merge_tmp/merge_pcnt' into 'master'
driver: PCNT

1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.

See merge request !229
2016-11-25 00:41:16 +08:00
Tian Hao
160e81e901 example : cleanup the order 2016-11-24 20:20:59 +08:00
Tian Hao
55e0690f69 component/bt : wifi/bt software coexist option
1. option of sw coexist
2. cpu set freq function modify
3. update lib
4. ld add static data address
2016-11-24 19:57:47 +08:00
Ivan Grokhotkov
1bcd90d45d Merge branch 'feature/system_apis' into 'master'
system_* APIs cleanup

This changeset is mostly about cleaning up `system_*` APIs and moving them from libcore. It has dragged a few more changes along, however.

- `system_deep_sleep` deprecated, new name is `esp_deep_sleep`
- `system_efuse_read_mac` deprecated, new name is `esp_efuse_read_mac`
- `system_read/write_rtc_mem` removed (reason: we use linker to place code/data into RTC memory now)
- `system_get_sdk_version` deprecated. Returns "master" for now. Support for compile-time and runtime version detection will be done in a separate MR.
- `system_get_time` and variations have been deprecated. `gettimeofday` should be used instead.
- `system_restart` deprecated, new name is `esp_restart`. Rewritten code to work correctly from any of the cores.
- `system_restore` deprecated, `esp_wifi_restore` should be used instead.
- `system_get_rst_info` removed (it wasn't in a header file)
- RTC library has been updated to latest version
- Logging output from `libfoo.a` goes through `foo_printf` function now, where `foo ` is any of the library names. For libraries other than rtc and phy, this is a temporary measure, until we finish switching to esp_log library and clean up all uses of printf/ets_printf.
- ESP-IDF build will fail if any of the libraries have printf/ets_printf reference.
-  Added `esp_random` function which gets values from HW RNG. I have added code which makes sure the value is not polled too often (allows at least 16 APB cycles). Also added a header file for HW RNG (just one register).
- Moved random number generation functions used by wpa library into wpa_supplicant component.

See merge request !234
2016-11-24 18:22:50 +08:00
Tian Hao
7a41ab6982 Merge branch 'master' into feature/btdm_bluedroid
1. update bt lib submodule

# Conflicts:
#	components/bootloader/src/main/esp32.bootloader.ld
#	components/bt/component.mk
#	components/esp32/component.mk
#	components/esp32/lib
2016-11-24 15:45:04 +08:00
Wangjialin
f97f198c9d driver: improve pulse counter code
1. Modify some comments in pcnt.h
2. Modify api/pcnt.rst
3. Improve example code.
4. Add status definitions in pcnt_reg.h
2016-11-24 12:01:21 +08:00
Angus Gratton
79646f41b5 Fixes for stdlib.h inclusion
Refs:
http://esp32.com/viewtopic.php?f=13&t=550
http://esp32.com/viewtopic.php?f=13&t=551

rmt.c should include stdlib.h for malloc, esp_bignum,c &
https_request_main.c for abort().

FreeRTOSConfig.h is only including stdlib if
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is
included for abort() so needs to be included whenever
CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set.

This change includes unconditionally in FreeRTOSConfig.h. This is to
avoid this kind of bug where compiler errors are dependent on config. I
suggest we don't change this to be more selective until we have 'make
randomconfig' style tests in CI.
2016-11-24 08:20:21 +11:00
Wangjialin
6db1482cd5 Merge branch 'master' into driver_merge_tmp/merge_pcnt
# Conflicts:
#	components/driver/include/driver/periph_ctrl.h
2016-11-23 18:15:54 +08:00
Tian Hao
85aac3afa6 component/bt : decrease callback cb param size
1. decrease callback cb param size
2. add write in gatt server demo
2016-11-23 15:34:21 +08:00
Wangjialin
a3c4a70ba3 driver: add hardware timer code.
1. add timer driver code
2. add timer example code
3. replace api for enable interrupt in task_wdt.c
2016-11-23 02:15:27 +08:00
Ivan Grokhotkov
df6edb50e9 implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00
Tian Hao
db007fbb2e component/bt : clean up the demos
1. cleanup gatt client demo
2. cleanup gatt server demo
3. cleanup blufi demo
4. use correct log level
2016-11-22 20:32:45 +08:00
Tian Hao
595bd2e3c4 component/bt : gatt client fix search service bug
1. fix search service bug
2. delete some print
2016-11-22 17:26:30 +08:00
Wangjialin
6a1dbc3f1c add RMT driver and example 2016-11-22 00:57:19 +08:00
Tian Hao
3b432735c6 component/bt : fix advertising data and refer bug 2016-11-21 22:38:00 +08:00
Wangjialin
1cc1d9d721 driver: Add PCNT code
1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.
2016-11-21 18:17:07 +08:00
Tian Hao
4ed6404e9f Merge remote-tracking branch 'remotes/origin/feature/btdm_arch_debug1' into feature/btdm_arch
# Conflicts:
#	components/bt/bluedroid/api/include/esp_gatt_defs.h
#	components/bt/bluedroid/btc/profile/std/gap/btc_gap_ble.c
2016-11-21 14:50:51 +08:00
Yulong
1561c02ba9 component bt:Add stop scan API to the esp_gap_ble API module 2016-11-19 09:56:36 -05:00
Yulong
a76b65ed95 compnent bt:debug the btc_gattc received data error issues. 2016-11-19 08:00:08 -05:00