Commit graph

4392 commits

Author SHA1 Message Date
Jiang Jiang Jian
041faad1c9 Merge branch 'feature/add_more_information_about_wifi_config' into 'master'
wifi: Add more information about wifi config

See merge request idf/esp-idf!2384
2018-05-18 17:29:32 +08:00
kooho
33b99caf50 driver(uart):Fix the bug that uart buffer_full flag is true all the time. 2018-05-18 16:46:10 +08:00
Angus Gratton
af2cb3ba8b Merge branch 'feature/vfs_find_free_fd' into 'master'
Add "find file descriptor" API to be used by VFS drivers

See merge request idf/esp-idf!2389
2018-05-18 15:22:20 +08:00
kooho
ef39c09bc1 driver: reset communication peripherals when the cpu starts. 2018-05-18 14:41:58 +08:00
Roland Dobai
18e83bcd53 Allow VFS file descriptors in select() 2018-05-18 08:06:33 +02:00
Roland Dobai
2aa9c15906 VFS: allow to find free file descriptors & register them 2018-05-18 07:57:35 +02:00
Deng Xin
8b389419ab (wifi): Add more information about wifi config
1. Update libphy.a to v3900
2. Update librtc.a to v238
3. add scan_method, sort_method and threshold when invoke esp_wifi_get_config()
4. add rssi of each STA in softAP list
5. add country information in scan result
6. add noise floor in rx pkt

Closes https://github.com/espressif/esp-idf/issues/1095
Closes https://github.com/espressif/esp-idf/issues/1723
Closes https://github.com/espressif/esp-idf/issues/1483
2018-05-18 11:55:55 +08:00
Jiang Jiang Jian
d84add4513 Merge branch 'bugfix/performance_tests_psram' into 'master'
tests: Increase performance thresholds when running with PSRAM

See merge request idf/esp-idf!2414
2018-05-18 11:35:33 +08:00
Ivan Grokhotkov
028fbb58e8 freertos,esp32: automatic light sleep support 2018-05-18 03:14:46 +00:00
Angus Gratton
51aceaa030 Merge branch 'bugfix/idle_task_stack_size' into 'master'
freertos: Bump default idle task stack size to 1536 bytes

See merge request idf/esp-idf!2411
2018-05-18 10:10:13 +08:00
Liu Zhi Fu
4e9ea81208 esp32: support to create wifi task on any core
Support to create WiFi task on any core.
Closes https://github.com/espressif/esp-idf/issues/968
2018-05-17 22:04:08 +08:00
Jiang Jiang Jian
cf9499479c Merge branch 'bugfix/i2s_mix_result_with_error_code_master' into 'master'
fix i2s mix result and error code

See merge request idf/esp-idf!2227
2018-05-17 21:53:06 +08:00
Jiang Jiang Jian
f64f70250d Merge branch 'feature/add_set_factory_info_customer_in_wps_v3.1' into 'master'
wifi: add set factory information feature by customer in wps

See merge request idf/esp-idf!2412
2018-05-17 21:49:40 +08:00
Angus Gratton
a2241fb4bc tests: Increase performance threshold for VFS running with PSRAM
Cache effects on microbenchmarks in cached flash can be significant, depending on linker layout in flash.
2018-05-17 21:02:47 +08:00
Jiang Jiang Jian
8c657dfee4 Merge branch 'bugfix/fix_an_error_in_comment_of_uart_driver' into 'master'
deiver(uart):revise the explanation of uart break length

See merge request idf/esp-idf!2398
2018-05-17 17:17:14 +08:00
Jiang Jiang Jian
993b8b7bf6 Merge branch 'bugfix/o3_fails' into 'master'
Fix compilation errors when -O3 is used

See merge request idf/esp-idf!2396
2018-05-17 16:48:13 +08:00
Deng Xin
54d9a392e4 wifi: add set factory information feature by customer in wps 2018-05-17 16:45:53 +08:00
Jiang Jiang Jian
59db3cb1c2 Merge branch 'bugfix/wifi_fix_a_few_wifi_bugs' into 'master'
Fix a few WiFi bugs

See merge request idf/esp-idf!2312
2018-05-17 16:33:38 +08:00
Zhang Zhao Xiang
9deb58859c fix i2s mix result and error code 2018-05-17 10:59:04 +08:00
Angus Gratton
4719bab2f3 freertos: Bump default idle task stack size to 1536 bytes
In situations where idle task runs a lot of idle hooks or cleanup code
(due to pthread local storage, etc) it can use more than 1KB of stack.

(I think the trigger is if a context switch happens at the right point
in the TLS cleanup).

Also removes an sdkconfig.default which accidentally set all config items,
including this stack size.
2018-05-17 10:37:24 +08:00
David Cermak
5ecf717e40 DhcpFuzzer: dhcp client addded 2018-05-16 14:52:42 +02:00
Wangjialin
f6927ccde9 bootloader(flash): fix flash QIO mode configuration error.
reported from github: https://github.com/espressif/esp-idf/issues/1944

1. Add SPI register setup in execute_flash_command.
2. Save and recover the SPI ctrl register in execute_flash_command.
2018-05-16 12:42:29 +00:00
Alex Lisitsyn
44b1bc0ab9 esp32: Add .noinit and .rtc_noinit sections to the linker script
Added .rtc_noinit and .noinit section definitions into linker file /esp32/ld/esp32.common.ld.
The macro __NOINIT_ATTR, RTC_NOINIT_ATTR declared in esp32/esp_attr.h file.
Added unit test file to test added behavior for noinit variables and its attributes.
Added documentation changes for new added attributes.
Make some corrections after code review:
The linker file has been corrected to place noinit section before bss_start to make it safer.
Documentation file has been modified to clarify reset behavior of allocated data .
Corrected typos in test_noinit.c and removed assertion of noinit variable to avoid possible issues with ROM boot loader memory allocation.
The linker file has been corrected to place noinit section before bss_start to make it safer.
Documentation file has been modified to clarify reset behavior of allocated data .
Corrected typos in test_noinit.c and removed assertion of noinit variable to avoid possible issues with ROM boot loader memory allocation.
Update test_noinit.c file to address RTCWDT_RTC_RESET reset reason instead of POWERON_RESET.
Test optimized to pass automated unit testing.
esp32: Add .noinit and .rtc_noinit sections to the linker script
Update of general-notes.rst documentation to fomat examples as code and attributes as identifiers.
Test test_noinit.c corrected to pass automated testing (support ofTEST_CASE_MULTIPLE_STAGES())

https://ezredmine.espressif.cn:8765/issues/15878
2018-05-16 17:33:37 +05:00
Angus Gratton
f4f305bdbd Merge branch 'bugfix/mbedtls_submodule' into 'master'
mbedtls: Add submodule check at build time

See merge request idf/esp-idf!2395
2018-05-16 19:52:45 +08:00
Angus Gratton
b2e264ef52 Merge branch 'feature/ledc_add_api_set_hpoint_val' into 'master'
driver(ledc): fix duty and fade issues and add thread-safe version APIs.

See merge request idf/esp-idf!2233
2018-05-16 19:52:26 +08:00
baohongde
174501ff35 component/bt: modify BT GAP structure
1. Separate the upward and the downward
2. Cancel use of msg.aid when call btc_transfer_context
2018-05-16 18:58:13 +08:00
XiaXiaotian
40efc36849 Fix a few WiFi bugs
1. remove rc when ap not found

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

2. allocate mimo packet to internal memory

3. use FRC2 timer instead of WDEV_NOW() for modem sleep to calculate
   TBTT time.

   It fixes the bug that TBTT will be incorrect if beacon is lost.
2018-05-16 18:50:28 +08:00
Jiang Jiang Jian
c54a679a41 Merge branch 'bugfix/fix_interrupt_list_insert_issue' into 'master'
esp32: fix interrupt list insert issue

See merge request idf/esp-idf!2391
2018-05-16 18:18:58 +08:00
Jiang Jiang Jian
4b4a587540 Merge branch 'bugfix/touch_change_default_enable_value' into 'master'
bugfix(touch): change the default value for sar_touch_enable register.

See merge request idf/esp-idf!1870
2018-05-16 17:40:18 +08:00
Jiang Jiang Jian
f502e195aa Merge branch 'bugfix/improve_bt_debug' into 'master'
components/bt: Improve the Bluetooth debug messaging scheme

See merge request idf/esp-idf!2303
2018-05-16 16:04:34 +08:00
Liu Zhi Fu
846b848bfc esp32/docs: fully support esp_wifi_80211_tx
Closes https://github.com/espressif/esp-idf/issues/1256
Closes https://github.com/espressif/esp-idf/issues/1332
2018-05-16 13:37:54 +08:00
Angus Gratton
7ae1e9463e Merge branch 'bugfix/rtc_xtal_tests' into 'master'
ci: Only run XTAL unit tests assuming board has an XTAL

See merge request idf/esp-idf!2401
2018-05-15 18:44:46 +08:00
Angus Gratton
3d92c6cccd nvs README: Remove section about encryption capability 2018-05-15 18:02:28 +08:00
Angus Gratton
05e09a5bac ci: Only run XTAL unit tests assuming board has an XTAL, run less repeats 2018-05-15 15:43:24 +08:00
Angus Gratton
d1066e9d7f Merge branch 'feature/dport_access' into 'master'
soc: Dport access with pre-read register APB

See merge request idf/esp-idf!2257
2018-05-15 15:32:28 +08:00
He Yin Ling
0ae6a83768 Merge branch 'test/add_iperf_example_test' into 'master'
test: add iperf example test

See merge request idf/esp-idf!1753
2018-05-15 14:58:08 +08:00
Angus Gratton
ae7cee02d2 Merge branch 'feature/vfs_access' into 'master'
Implement VFS support for access()

See merge request idf/esp-idf!2378
2018-05-15 14:33:51 +08:00
Angus Gratton
fcd5d0869d Merge branch 'bugfix/spi_native_pins' into 'master'
fix several spi issues about pin configurations

See merge request idf/esp-idf!2309
2018-05-15 14:19:20 +08:00
He Yin Ling
e8dd203e47 example test: add test case for iperf example 2018-05-15 13:42:26 +08:00
Angus Gratton
662fe55996 Merge branch 'bugfix/select_rtc_slow_clk' into 'master'
esp32/clk: Fix starting rtc oscillator if it bad

See merge request idf/esp-idf!2215
2018-05-15 12:57:22 +08:00
Konstantin Kondrashov
9ad0760b9d esp32/clk:Fix starting rtc oscillator if it is bad
If the RTC crystal is bad or has no matched capacitance, then you do not need to start such the crystal. It is necessary to determine this case, output an error (about impossibility to start from the oscillator) and start from the internal RC of the chain.

Reduced the default value of the number of bootstrap cycles. Because we can oscillating the oscillator which then stops. (in Kconfig). Changed from 100 to 5.

The number of calibration cycles has been increased. It is the main criterion for estimating the launch of an oscillator. A large increase leads to an increase in the load time, as well as the stability of recognition of this case. (in Kconfig).
Changed from 1024 to 3000.
2018-05-15 08:59:15 +05:00
Angus Gratton
31d53bc059 Merge branch 'bugfix/sdspi_delayed_write_response' into 'master'
sdspi: handle delayed response to data write command

See merge request idf/esp-idf!2290
2018-05-15 10:32:21 +08:00
Jiang Jiang Jian
73d20981de Merge branch 'bugfix/rmt_tx_stop_bug' into 'master'
driver(rmt):  RMT tx stop  workaround

See merge request idf/esp-idf!1915
2018-05-15 10:04:33 +08:00
Jiang Jiang Jian
33b11c6f6a Merge branch 'feature/adjust_log_level_about_uart' into 'master'
feat: Adjust log level about UART

See merge request idf/esp-idf!2047
2018-05-15 09:59:21 +08:00
Ivan Grokhotkov
9379d7b9f9 sdmmc: wait for command done event even if data transfer is over
This fixes errors logged on the console: sdmmc_req:
handle_idle_state_events unhandled: 00000004 00000000

The issue happens if "data done" event occurs before "command done".
State machine code did not check *which* event occurred in
SENDING_CMD state, and went to IDLE or SENDING_DATA state on any
non-error event. In this case, we can't process "data done" event
until command has completed. This change introduces "unhandled event"
mask, which is carried over from one run of process_events to the
other. This allows waiting for the "command done" event to complete,
and then process "data done" event.

Ref TW17126.
2018-05-15 09:59:20 +08:00
Ivan Grokhotkov
cf81db40a2 sdio: allow reads/writes with lengths not divisible by 4
CMD53 in byte mode supports transfers of any number of bytes between 1
and 512. This change removes limitation that the number of bytes must
be divisible by 4. Host quirk, that such transfers must be split into
two commands (one for the aligned part and the other one for
unaligned) is taken into account.
2018-05-15 09:59:20 +08:00
Jiang Jiang Jian
97a228e6ab Merge branch 'bugfix/rename_clk_rst_bits_for_spi' into 'master'
rename clock enable and reset bits for SPI modules

See merge request idf/esp-idf!2293
2018-05-15 09:49:56 +08:00
Jiang Jiang Jian
6adaeb0048 Merge branch 'bugfix/btdm_fix_crash_without_smp_when_deinit_bluedroid' into 'master'
Component/bt: fix crash without SMP when deinit bluedroid

See merge request idf/esp-idf!2375
2018-05-14 21:20:44 +08:00
David Cermak
3a6d256d3e DhcpFuzzer: Added AFL test for dhcpserver with sample packets 2018-05-14 15:03:37 +02:00
Konstantin Kondrashov
8f80cc733d soc: Change DPORT access
When two CPUs read the area of the DPORT and the area of the APB, the result is corrupted for the CPU that read the APB area.
And another CPU has valid data.

The method of eliminating this error.
Before reading the registers of the DPORT, make a preliminary reading of the APB register.
In this case, the joint access of the two CPUs to the registers of the APB and the DPORT is successful.
2018-05-14 17:54:57 +05:00
Hrishikesh Dhayagude
da6cb6c741 components/bt: Improve the Bluetooth debug messaging scheme
As of now, when Bluetooth debugs are enabled, all the messages are
mapped to BT_PRINTF which is mapped to ESP_LOGE. Hence, make monitor
shows all logs in red color which might lead to missing the actual
errors

This patch maps the Bluetooth messages to appropriate ESP_LOG* messages
and improves readability.

Also, make the BT trace level be configurable in menuconfig, so that
each layer of bt trace can be enabled/disabled.

Finally, add debug log control for BTC, OSI, BLUFI and clear up
Bluetooth debug logs.

So, with this the method of enabling Bluetooth logs is as follows:
1. make menuconfig -> Component config -> Bluetooth -> Bluedroid Enable
-> BT DEBUG LOG LEVEL -> set trace level for every layer of BT

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-05-14 20:45:05 +08:00
Jiang Jiang Jian
256a9a8a33 Merge branch 'feature/wifi_add_sniffer_ctrl_pkt' into 'master'
add sniffer control packet support

See merge request idf/esp-idf!1904
2018-05-14 20:42:15 +08:00
Jiang Jiang Jian
9e5318b584 Merge branch 'bugfix/btdm_reconnect_con_params_update_reject_in_smp' into 'master'
Component/bt: update con params is rejected in smp when reconnection

See merge request idf/esp-idf!2318
2018-05-14 20:19:29 +08:00
chenjianqiang
b5de860bcb revise the explain of a parameter(brk_len) in uart driver file 2018-05-14 19:47:16 +08:00
kooho
a8d26d7e4d driver(rmt):Fix rmt_tx_stop bug. 2018-05-14 19:46:30 +08:00
Angus Gratton
b888032a8c Merge branch 'bugfix/logging_docs_cleanup' into 'master'
log: clean up docs, clarify esp_log_level_set usage

See merge request idf/esp-idf!2080
2018-05-14 18:36:35 +08:00
Roland Dobai
ca08397b6b Fix compilation errors when -O3 is used
Closes https://github.com/espressif/esp-idf/issues/718
2018-05-14 12:29:57 +02:00
jack
c384fa2492 rename clock enable and reset bits for SPI modules
1.The names of clock enable and reset bits do not match with TRM, just rename them.
2018-05-14 16:45:03 +08:00
Angus Gratton
c94a5ecfdd mbedtls: Add mbedtls submodule check to build system 2018-05-14 16:07:18 +08:00
Jiang Jiang Jian
d4276efed7 Merge branch 'bugfix/bluedroid_const_char' into 'master'
Bluedroid: remove warnings about discarding "const" for "const char*"

See merge request idf/esp-idf!2387
2018-05-14 15:25:45 +08:00
Roland Dobai
4345e198ce Implement VFS support for access()
Closes https://github.com/espressif/esp-idf/issues/1085
2018-05-14 09:04:18 +02:00
XiaXiaotian
57297cf7b7 add sniffer control packet support 2018-05-14 14:16:03 +08:00
Liu Zhi Fu
1c81e4be60 esp32: fix interrupt list insert issue
If the allocated interrupt list is not empty and the new item will be inserted
as the header of the list, insert_vector_desc() causes crash because pre is
null. This commit fix this issue.
2018-05-14 14:13:08 +08:00
He Yin Ling
adc3315677 Merge branch 'test/add_unit_test_jobs' into 'master'
ci: increase number of unit test jobs, temporarily disable light sleep test for short durations

See merge request idf/esp-idf!2386
2018-05-14 14:06:05 +08:00
kooho
1bebec05c6 driver(ledc): fix duty and fade issues and add thread-safe version APIs.
1. Fix the duty fade check issue reported from https://github.com/espressif/esp-idf/issues/1914
2. Fix the duty overflow issue when duty_scale is set to 1.
3. Fix the duty fade error when a fade operation is under way. We must configure a new duty setting after the previous fade operation has finished due to hardware limit.
4. Add thread-safe version APIs to set duty and fade.
5. Correct the duty range in driver.
2018-05-14 12:27:21 +08:00
Angus Gratton
e23ee9fa73 Merge branch 'bugfix/ledc_error' into 'master'
ledc driver: Clarify logging of function argument errors

See merge request idf/esp-idf!2380
2018-05-14 09:16:02 +08:00
Angus Gratton
6817088ce4 Merge branch 'feature/mbedtls_2_9_0' into 'master'
Re-add mbedTLS as a submodule, update to 2.9.0

See merge request idf/esp-idf!2367
2018-05-14 09:15:44 +08:00
Angus Gratton
64c52022b9 Merge branch 'bugfix/add_comments_for_adc' into 'master'
driver(adc): Add descriptions that starting ADC can trigger interrupt of GPIO36…

See merge request idf/esp-idf!1910
2018-05-11 18:54:40 +08:00
Ivan Grokhotkov
1b7ed6455b esp32/test: temporarily disable test for light sleep duration
Until the issue in CI is debugged
2018-05-11 18:15:58 +08:00
Angus Gratton
3a53e35fe8 Merge branch 'bugfix/vfs_append' into 'master'
VFS: use O_APPEND flag of open() correctly

See merge request idf/esp-idf!2382
2018-05-11 18:12:47 +08:00
Roland Dobai
2041c08681 Bluedroid: remove warnings about discarding "const" for "const char*" 2018-05-11 11:29:10 +02:00
kooho
d53661a663 driver(adc): add descriptions for the issue that starting ADC can trigger interrupt of GPIO36 and GPIO39. 2018-05-11 17:08:58 +08:00
Jiang Jiang Jian
a5f36ec2d5 Merge branch 'feature/wifi_refactor_smartconfig' into 'master'
refactor smartconfig

See merge request idf/esp-idf!2205
2018-05-11 16:23:22 +08:00
Jiang Jiang Jian
5616491c50 Merge branch 'bugfix/i2s_dma_buf_alloc' into 'master'
i2s: fix issue in dma descriptor allocation if SPIRAM is enabled

See merge request idf/esp-idf!2383
2018-05-11 16:03:40 +08:00
Jiang Jiang Jian
41228c83c7 Merge branch 'bugfix/dhcp_server_max_limit' into 'master'
dhcp/dhcpserver Fix max station limit check in dhcp server

See merge request idf/esp-idf!2298
2018-05-11 15:50:38 +08:00
Jiang Jiang Jian
325920046f Merge branch 'bugfix/btdm_conn_fail_after_deinit_and_init_spp' into 'master'
component/bt: Fix can't be connected if init SPP again after SPP deinit

See merge request idf/esp-idf!2369
2018-05-11 15:38:03 +08:00
Jiang Jiang Jian
41ba013bd4 Merge branch 'bugfix/btdm_fix_service_change_write_busy' into 'master'
Component/bt: fix service change write busy

See merge request idf/esp-idf!2359
2018-05-11 15:20:04 +08:00
Jiang Jiang Jian
c1e0f029d1 Merge branch 'bugfix/btdm_a2dp_disconn_state_when_connecting_with_iphone' into 'master'
component/bt: Fix bug a2dp have disconnect state when connecting with iphone 7

See merge request idf/esp-idf!2288
2018-05-11 14:59:34 +08:00
Ivan Grokhotkov
827772df69 Merge branch 'bugfix/light_sleep_wdt_fix' into 'master'
Fix occasional WDT reset in light sleep test

See merge request idf/esp-idf!2374
2018-05-11 14:55:51 +08:00
XiaXiaotian
0033c3ef3a refactor smartconfig
move wifi part to wifi lib and lwip part to idf
2018-05-11 14:49:35 +08:00
Roland Dobai
733ff15719 VFS: use O_APPEND flag of open() correctly
Closes https://github.com/espressif/esp-idf/pull/1455
2018-05-11 08:28:22 +02:00
Ivan Grokhotkov
12f707932f log: clean up docs, clarify esp_log_level_set usage
Closes https://github.com/espressif/esp-idf/issues/1713
2018-05-11 13:55:16 +08:00
Mahavir Jain
b2a1a79eb4 i2s: fix issue in dma descriptor allocation if SPIRAM is enabled
It has been observed that, if external SPIRAM is enabled, then under
certain scenarios (e.g. internal memory being too much fragmented),
I2S tx/rx descriptors can land in external SPIRAM and hence resulting
in failure in DMA. Adding explicit capability to allocate in only DMA
capable memory.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-05-10 18:26:01 +05:30
Angus Gratton
feb64c3be6 ledc driver: Clarify logging of function argument errors
Some parameter errors did not specify which parameter was invalid.

Adds a new macro to name the invalid param.
2018-05-10 17:21:35 +08:00
zhangyanjiao
be76260d81 wifi: fix some potential thread safe issue
change some API function to throw event:

esp_wifi_deauth_sta
esp_wifi_get_country
esp_wifi_ap_get_sta_list
esp_wifi_sta_get_ap_info
esp_wifi_stop
esp_wifi_get_channel
esp_wifi_get_protocol
esp_wifi_get_bandwidth
2018-05-10 16:24:43 +08:00
baohongde
dfbc59f1c2 component/bt: Fix can't be connected if init SPP again after SPP deinit 2018-05-10 16:16:25 +08:00
Ivan Grokhotkov
ade14518ef Merge branch 'feature/vfs_small_fds' into 'master'
Use smaller numbers as file descriptors

See merge request idf/esp-idf!2300
2018-05-10 14:29:34 +08:00
zhiweijian
b7a5fef871 Component/bt: fix crash without SMP when deinit bluedroid
- fix crash without SMP when bluedroid deinit
- modify default menuconfig in blufi demo
2018-05-10 11:39:34 +08:00
Ivan Grokhotkov
7dada45d60 mbedtls: enable deprecation warnings when building unit tests 2018-05-09 23:15:28 +08:00
Ivan Grokhotkov
dbc919eff5 mbedtls: update usage of mbedtls_aes_encrypt/decrypt 2018-05-09 23:15:28 +08:00
Ivan Grokhotkov
aad51ea8a0 mbedtls/port: don’t re-declare mbedtls_shaX functions
ALT header files for sha1, sha256, sha512 are only supposed to declare
mbedtls_sha1_context data structure. Function prototypes should come
from original header files.
2018-05-09 23:15:28 +08:00
Ivan Grokhotkov
254e29aca4 mbedtls: update usage of deprecated mbedtls_shaX APIs
The following mbedTLS APIs have been deprecated and replaced with the
new ones which return error codes:

mbedtls_shaX_starts -> mbedtls_shaX_starts_ret
mbedtls_shaX_update -> mbedtls_shaX_update_ret
mbedtls_shaX_finish -> mbedtls_shaX_finish_ret
mbedtls_shaX_process -> mbedtls_shaX_internal_process

Update hardware implementations of SHA functions, and other IDF
components which used above functions, to use new versions.
2018-05-09 23:15:28 +08:00
Ivan Grokhotkov
e9cbf96bd1 mbedtls: re-add version 2.9.0 as a submodule 2018-05-09 23:15:28 +08:00
Ivan Grokhotkov
8c307a5720 sleep: fix deadlock in esp_timer_impl_advance after light sleep
When light sleep is started, the other CPU gets halted using DPORT
stall mechanism. This can happen while it is inside an esp_timer
critical section, which may lead to a deadlock. This change adds
functions to take and release esp_timer lock before entering
DPORT critical section, preventing the deadlock.
2018-05-09 22:52:50 +08:00
Ivan Grokhotkov
296b280801 esp_timer: fix esp_timer_impl_advance not triggering expired timers 2018-05-09 22:52:41 +08:00
zhiweijian
cb59576dd0 Component/bt: fix service change write busy 2018-05-09 20:49:26 +08:00
zhiweijian
58b2cb3e0c Component/bt: update con params is rejected in smp when reconnection 2018-05-09 20:28:13 +08:00
Jiang Jiang Jian
b9aee83d9b Merge branch 'feature/put_supplicant_source_code_from_VNC_to_IDF' into 'master'
wpa_supplicant: move part of codes to IDF

See merge request idf/esp-idf!2272
2018-05-09 15:19:37 +08:00
Deng Xin
b00d256d5b wpa_supplicant:move part of codes to IDF 2018-05-09 10:44:35 +08:00
Ivan Grokhotkov
a2556229aa Merge branch 'bugfix/uart_fix_get_baudrate_error_bug' into 'master'
driver(uart):   Fix uart_get_baudrate incorrect return value when using ref_tick

See merge request idf/esp-idf!2295
2018-05-08 20:25:13 +08:00
michael
197f594b06 fix(spi): fix the issue when bus flag not set, dual mode cannot be used. 2018-05-08 15:47:26 +08:00
michael
28beafc624 fix(spi): fix the issue that native pins don't work after SPI initialized before 2018-05-08 15:47:25 +08:00
Michael (XIAO Xufeng)
1f085b1a3b feat(gpio): add function allowing switching input source from GPIO back to IOMUX 2018-05-08 15:47:25 +08:00
Angus Gratton
bb1f3ae264 Merge branch 'feature/psram_configure_in_runtime' into 'master'
feature(psram): update psram and flash SPI frequency in runtime

See merge request idf/esp-idf!1776
2018-05-08 15:23:47 +08:00
Jiang Jiang Jian
139a8a2745 Merge branch 'bugfix/optimize_coexist_performance' into 'master'
component/esp32 : improve wifi and bluetooth coexistence performance

See merge request idf/esp-idf!2349
2018-05-08 11:11:03 +08:00
Tian Hao
8cd9deed5c component/esp32 : improve wifi and bluetooth coexistence performance
1. update coexistence and wifi libraries. Coexist version update to
v0.9.2
2. Cancel the restriction of use AMPDU when SW_COEXIST_ENABLE is y.
2018-05-07 19:55:41 +08:00
Jiang Jiang Jian
db90f49758 Merge branch 'bugfix/update_emac_h' into 'master'
update emac_reg_v2.h

See merge request idf/esp-idf!2050
2018-05-07 16:16:52 +08:00
Roland Dobai
80ff8d55ac bluedroid: use the new socket registering API 2018-05-07 09:01:56 +02:00
Roland Dobai
5129bca67c VFS: Use smaller numbers as file descriptors 2018-05-07 09:01:56 +02:00
Angus Gratton
06082d9308 Merge branch 'doc/spi_master_thread_safety' into 'master'
driver: Add notes to SPI driver docs about thread safety

See merge request idf/esp-idf!2354
2018-05-07 14:49:41 +08:00
Jiang Jiang Jian
dc13f489ca Merge branch 'bugfix/fix_two_wifi_bugs' into 'master'
esp32: fix two wifi bugs

See merge request idf/esp-idf!2352
2018-05-07 14:00:24 +08:00
Ivan Grokhotkov
73ec743a0a Merge branch 'bugfix/nvs_page_compaction' into 'master'
nvs: Fix recovery from power-off while page is being freed

See merge request idf/esp-idf!2327
2018-05-07 09:08:23 +08:00
Angus Gratton
b90ad81f22 driver: Add notes to SPI driver docs about thread safety 2018-05-07 09:03:48 +08:00
Liu Zhi Fu
a9dfa06125 esp32: fix two wifi bugs
1. Fix the bug that WiFi receives duplicate MPDU
2. Deauth the station if soft-AP already has max WiFi connections
2018-05-06 17:29:06 +08:00
baohongde
cbab7fec76 component/bt: Fix bug a2dp have disconnect state when connecting with iphone 7 2018-05-04 19:44:40 +08:00
Jiang Jiang Jian
b827e0e331 Merge branch 'feature/btdm_get_end_handle_when_get_include_service' into 'master'
Component/bt: get end_handle when get include services

See merge request idf/esp-idf!2319
2018-05-04 19:31:43 +08:00
Jiang Jiang Jian
ade78d3850 Merge branch 'bugfix/btdm_fix_version_excahnge_issue' into 'master'
Component/bt: fix version exchange issue

See merge request idf/esp-idf!2329
2018-05-04 19:30:03 +08:00
Jiang Jiang Jian
25440cbc23 Merge branch 'bugfix/tw12351_wifi_lock_op' into 'master'
esp32: optimize wifi lock

See merge request idf/esp-idf!2345
2018-05-04 19:27:14 +08:00
Jiang Jiang Jian
dc7280c1d9 Merge branch 'bugfix/tw20575_fix_potential_phy_calibration_bug' into 'master'
esp32: fix potential PHY calibration bug

See merge request idf/esp-idf!2339
2018-05-04 19:24:05 +08:00
Liu Zhi Fu
017f109f6e esp32: optimize wifi lock
Replace portENTER_CRITICAL/portEXIT_CRITICAL with semaphore lock if
the protected resource is only accessed by different tasks
2018-05-04 10:36:04 +08:00
kooho
0dca2d4c68 driver(uart): Fix uart_get_baudrate incorrect return value when using ref_tick 2018-05-04 09:41:41 +08:00
baohongde
c22c070e07 component/bt: Add APIs of get and remove bond device
1. Add APIs of get and remove bond device
2. Add ESP_BT_GAP_AUTH_CMPL_EVT
2018-05-03 19:05:57 +08:00
Liu Zhi Fu
402dee17a1 esp32: fix potential PHY calibration bug
1. Add error log if failed to store calibration version/mac/data
2. Change the NVS calibration version/mac/data store sequence
3. Pass the init_data instead of NULL to esp_phy_rf_init() in esp_phy_load_cal_and_init()
2018-05-03 15:48:14 +08:00
Jiang Jiang Jian
444d6606e7 Merge branch 'bugfix/mark_auto_connect_api_as_obsolete' into 'master'
esp32: mark WiFi auto connect API as deprecated

See merge request idf/esp-idf!1970
2018-05-03 10:40:27 +08:00
Angus Gratton
ec536b3961 Merge branch 'bugfix/wifi_log_level' into 'master'
wifi: Set default wifi library log level based on sdkconfig

See merge request idf/esp-idf!2334
2018-05-03 10:21:19 +08:00
Ivan Grokhotkov
0d65f3b7f9 Merge branch 'bugfix/light_sleep_fixes' into 'master'
light sleep fixes

See merge request idf/esp-idf!2242
2018-05-02 20:09:36 +08:00
Ivan Grokhotkov
34816ff008 Merge branch 'bugfix/free_mem_console' into 'master'
Free allocations in command.c after error conditions

See merge request idf/esp-idf!2332
2018-05-02 15:48:31 +08:00
Ivan Grokhotkov
5cc966e5b4 Merge branch 'feature/aws_iot_mqtt_on_443' into 'master'
aws_iot: add support for MQTT TLS over port 443

See merge request idf/esp-idf!2292
2018-05-02 15:43:29 +08:00
Ivan Grokhotkov
57630bf5ec Merge branch 'bugfix/cjson_include_objs' into 'master'
cJSON : Include only source file objects

See merge request idf/esp-idf!2326
2018-05-02 15:42:59 +08:00
Sagar Bijwe
7ae1df1c5e nvs: Fix recovery from power-off while page is being freed
Currently when page is being freed, items are individually moved from
FREEING page to ACTIVE page and erased. If power-off happens during the
process, the remaining entries are moved to ACTIVE page during recovery.
The problem with this approach is there may not be enough space on
ACTIVE page for all items if an item was partially written before
power-off and erased during recovery. This change moves all the items
from FREEING to ACTIVE page and then erased the FREEING page, If
power-off happens during the process, then ACTIVE page is erased and the
process is restarted.
2018-05-02 12:18:02 +05:30
Angus Gratton
b9126e69bc wifi: Set default wifi library log level based on sdkconfig
Has to be set at runtime, due to precompiled wifi libraries.

Prompted by discussion on forum: https://esp32.com/viewtopic.php?f=2&t=5570&p=24216#p24216
2018-05-02 15:11:21 +10:00
Ivan Grokhotkov
5f956125c1 Merge branch 'feature/mfg_bin_create_utility' into 'master'
nvs_flash: Add external binary creation support for NVS partition.

See merge request idf/esp-idf!2031
2018-05-02 11:58:38 +08:00
Liu Zhi Fu
c23915939d esp32: mark WiFi auto connect API as obsolete
Mark esp_wifi_set/get_auto_connect as obsolete
2018-05-02 09:54:31 +08:00
Jiang Jiang Jian
1e8ab3d18e Merge branch 'bugfix/gap_appearance_fixes' into 'master'
components/bt: Make modifications to the support of GAP appearance/icon characteristic

See merge request idf/esp-idf!2249
2018-05-01 23:00:24 +08:00
Jiang Jiang Jian
0bb551c051 Merge branch 'bugfix/btdm_prepare_write_status_correct' into 'master'
component/bt: Check the value received from the peer device when sent the data used prepare write.

See merge request idf/esp-idf!2320
2018-05-01 22:57:20 +08:00
Jiang Jiang Jian
95cbdd76dc Merge branch 'feature/btdm_read_bredr_rssi' into 'master'
component/bt : add class bt read RSSI delta (golden range)

See merge request idf/esp-idf!2325
2018-05-01 22:55:50 +08:00
Anuj Deshpande
87adbd3229 console: Fix formatting 2018-04-30 14:22:45 +05:30
Anuj Deshpande
b3894dba97 console: Free alloc'd memory after error conditions
Closes https://github.com/espressif/esp-idf/issues/1901
2018-04-30 14:21:03 +05:30
Anuj Deshpande
9356d6af3f cJSON : Include only source file objects
- test.c can cause issues if there is another main function
- Closes https://github.com/espressif/esp-idf/issues/1883
2018-04-30 13:51:54 +05:30
Jiang Jiang Jian
5a080ee37a Merge branch 'bugfix/btdm_genrate_hash_key_by_bluedroid' into 'master'
component/bt: Added the hash key generated directly in the bluedroid module.

See merge request idf/esp-idf!2321
2018-04-28 16:42:27 +08:00
zhiweijian
5549ea3439 Component/bt: fix version exchange issue
- Android 7.0 version issue
- version exchange late in some phones
- can not get version in smp
2018-04-28 16:32:24 +08:00
Hrishikesh Dhayagude
fd7baaf4ba components/bt: Make modifications to the support of GAP appearance/icon
characateristic

1. In addition to mentioning in the documentation, use the standard appearance
   values already present and return appropriate error in case an incorrect
   value is passed
2. Add ESP_BLE_APPEARANCE* macros corresponding to BTM_BLE_APPEARANCE*
and use them from the API instead
3. Add the missing appearance parameter values from
https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.gap.appearance.xml
4. Fix some minor typos

Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-28 13:59:36 +05:30
zhiweijian
e236ffd91f Component/bt: get end_handle when get include services 2018-04-28 16:27:25 +08:00
Yulong
6c20bc3203 component/bt: Added the hash key generated directly in the bluedroid module.
1. Change all the hash used from the coap module to generated by the bluedroid module directly.

component/bt: Added the <string.h> include file to the gattc_co module to avoid compile error.
2018-04-28 03:11:05 -04:00
Jiang Jiang Jian
ee9ab48347 Merge branch 'feature/btdm_bt_spp_vfs' into 'master'
component/bt: Add SPP profile with VFS

See merge request idf/esp-idf!1883
2018-04-28 15:10:07 +08:00
Jiang Jiang Jian
25798b0e3a Merge branch 'feature/btdm_ble_throughput_optimiz' into 'master'
Feature/btdm ble throughput optimiz

See merge request idf/esp-idf!2265
2018-04-28 15:01:39 +08:00
baohongde
d95d0ececb component/bt: Add SPP profile with VFS 2018-04-28 11:36:22 +08:00
Yulong
fd3162d831 component/bt: Added the server test for the bit rate test.
component/bt: optimiz the code
component/bt: optimiz the code.
component/bt: added the l2c change.
component/bt: Added the modified.
component/bt: change the indicate callback function.

component/bt: added the BLE throughput test gattc & gatts example.

component/bt: Change the sdkconfig.default CONFIG_GATTS_NOTIFY_THROUGHPUT setting.

component/bt: Change the throughput_client_task delay method.

component/bt: change the btu task size from 4096 to 5096

comonent/bt: close the print when congest.

component/bt: Added the CPU frequency set method to the readme file.

component/bt: Change the gatts_demo_char1_val to gl_profile_tab[PROFILE_A_APP_ID].char_handle to avoid make error.

example/ble_throughput: Added the Readme explanation.

component/bt: Added the bt lib change.

component/bt: Update the bt lib & Change the LOG level from ERROR to DEBUG when congest.

component/bt: Fixed the bug of timer start assign error.

component/bt: Change back the gattc & gatts demo with same as the master.

example/ble_throughput: Fixed the bug when prepare write of the ble throughput.

component/bt: Update the check_sum algorithm.

component/bt: Change Added the path when used the include file of "l2cdefs.h" & "l2c_api.h".

example/throughput_client: Added the Freertos related header files to ble throughput client demo to avoid compile error.
2018-04-27 23:02:10 -04:00
Yulong
8f015e3e48 component/bt: Check the value received from the peer device when sent the data used prepare write.
component/bt: Fix misspellings of "corret" in comments in bta_gattc_write_cmpl function.
2018-04-27 08:20:01 -04:00
Liu Zhi Fu
ed46976f41 esp32/bt/driver: support static allocation of FreeRTOS queues used by ISR routine
Support static allocation of FreeRTOS queues used by ISR routine in WiFi/BT/esp_timer/driver etc
2018-04-27 15:02:30 +08:00
Tian Hao
8646913cbf component/bt : add class bt read RSSI delta (golden range) 2018-04-27 14:33:47 +08:00
Jiang Jiang Jian
cc2d1fda96 Merge branch 'bugfix/btdm_modify_include_path' into 'master'
component/bt : modify header files to avoid conflict

See merge request idf/esp-idf!2195
2018-04-27 12:01:46 +08:00
Jiang Jiang Jian
44c3318749 Merge branch 'mesh/feature_fix_root' into 'master'
Mesh/feature fix root

See merge request idf/esp-idf!2308
2018-04-27 10:56:35 +08:00
qiyueixa
ebd1849e18 mesh: add fix root function 2018-04-26 21:15:35 +08:00
Ivan Grokhotkov
94250e42a0 sleep: optimize light sleep wakeup latency 2018-04-26 19:36:47 +08:00
Tian Hao
adada3f67e component/bt : modify header files to avoid conflict
1. add the L1 include path with a prefix, such like osi/list.h, stack/a2d_api.h and etc.
2. modify component, only bluedroid/api/include/api is export to another component and application,
   other include path just for bluedroid used
3. put bluedroid/include into common/include/common, so the root directory of bluedroid have no include path.
4. modify doxygen to use esp_bt.h and redirect to
component/bt/bluedroid/api/include/api/

fix compile
2018-04-26 19:32:06 +08:00
Ivan Grokhotkov
ac623a9756 soc/rtc: restore dbg attenuation when waking from sleep
This fixes inability to enter deep sleep after waking up from light sleep
2018-04-26 18:52:46 +08:00
Ivan Grokhotkov
d38b22b11b soc/rtc, sleep: don’t lower the bias for wakeup state
This fixes watchdog resets occurring during wakeup from light sleep.
2018-04-26 18:52:45 +08:00
Ivan Grokhotkov
b0a91630fb soc/rtc: allow main XTAL to be powered on in sleep 2018-04-26 18:52:45 +08:00
Ivan Grokhotkov
3c78faa0a9 soc/rtc: don’t switch frequency in rtc_sleep_init 2018-04-26 18:52:45 +08:00
Ivan Grokhotkov
487210221b esp_timer: add internal function to adjust time 2018-04-26 18:52:45 +08:00
Ivan Grokhotkov
0236592fe5 Merge branch 'feature/esp32_sw_breaks' into 'master'
ESP32 SW Breakpoints Support

See merge request idf/esp-idf!2316
2018-04-26 18:05:38 +08:00
Ivan Grokhotkov
add969f69d Merge branch 'bugfix/partition_make3.81' into 'master'
partition table: Fix regression with make 3.81

See merge request idf/esp-idf!2314
2018-04-26 15:29:15 +08:00
Alexey Gerenkov
439140d269 esp32: Adds support for SW breakpoints in flash
Disables app image integrity checks when running under OpenOCD control.
Allows setting breakpoints in flash before application start (just after reset).
2018-04-26 10:17:02 +03:00
Ivan Grokhotkov
4083a356a8 Merge branch 'bugfix/build_failure_with_heap_task_tracking' into 'master'
Fix build failure if CONFIG_HEAP_TASK_TRACKING enabled

See merge request idf/esp-idf!2315
2018-04-26 15:16:43 +08:00
Ivan Grokhotkov
4ba19abeb6 esp_timer: add a function to get next alarm time 2018-04-26 14:39:54 +08:00
Jiang Jiang Jian
464dbbdaa9 Merge branch 'bugfix/fix_a_minor_compile_issue' into 'master'
Bugfix/fix a minor compile issue

See merge request idf/esp-idf!2307
2018-04-26 14:31:04 +08:00
Jiang Jiang Jian
37513cd738 Merge branch 'feature/wifi_add_wifi_event_mask' into 'master'
add WiFi event mask API

See merge request idf/esp-idf!2072
2018-04-26 14:27:42 +08:00
Mahavir Jain
5cdd08ef5a heap: fix build failure due to missing header
Closes https://github.com/espressif/esp-idf/issues/1881

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-26 11:08:58 +05:30
Jiang Jiang Jian
9b9eb7e724 Merge branch 'bugfix/fix_some_wifi_phy_mode_bugs' into 'master'
esp32: fix some wifi phy mode bugs

See merge request idf/esp-idf!2294
2018-04-26 10:27:32 +08:00
Angus Gratton
8fbdad5b0c partition table: Fix regression with make 3.81
"undefine" was added in make 3.8.2

Namespace the global partition table option variables to minimise scope leakage.
2018-04-26 12:07:27 +10:00
Ivan Grokhotkov
5a63faa516 sdmmc: enable more test cases
Some test cases did not run automatically in CI, this change enables
them.
2018-04-26 10:04:44 +08:00
Ivan Grokhotkov
2699bb49ae sdspi: handle delayed responses for data write commands
Command response tokens can be delayed from the original command by 1
to 8 bytes. In 4a2489b9, handling for delayed tokens was added for
normal (no data) commands, and data read commands. This adds handling
for delayed commands for data write commands.
2018-04-26 10:04:44 +08:00
Angus Gratton
081c830d2f Merge branch 'feature/partition_size_check' into 'master'
partition_table: Check configured flash size fits in partition table

See merge request idf/esp-idf!2274
2018-04-26 08:48:31 +08:00
Angus Gratton
d9cbfe42f9 Merge branch 'bugfix/log_macro_statements' into 'master'
log: Make ESP_LOGx macros into single statements

See merge request idf/esp-idf!2275
2018-04-26 08:05:49 +08:00
Angus Gratton
fa3205737f partition_table: Check configured flash size fits in partition table
Check happens at build time, so flash size config may need to be changed.

Also fixes MD5_OPT undefined warning, closes https://github.com/espressif/esp-idf/issues/1867
2018-04-26 09:51:55 +10:00
Angus Gratton
2f318d16fa log: Make ESP_LOGx macros into single statements
Requires a semicolon after any use (previously this was optional due to trailing } after expansion)

Closes https://github.com/espressif/esp-idf/issues/1757
2018-04-26 09:08:07 +10:00
jack
81e4cad615 fix the bug that in mdns test code redefine esp_err_t to uint32_t, which should be int32_t 2018-04-25 21:05:21 +08:00
Jiang Jiang Jian
683270958c Merge branch 'feature/btdm_set_bredr_txpower' into 'master'
component/bt : add BR/EDR TX power set

See merge request idf/esp-idf!2267
2018-04-25 20:53:21 +08:00
Liu Zhi Fu
f5ae421e14 esp32: fix some wifi phy mode bugs
Fix several WiFi phy mode bugs
2018-04-25 20:32:18 +08:00
XiaXiaotian
364c15b9f8 add WiFi event mask API 2018-04-25 19:25:43 +08:00
Tian Hao
e660785532 component/bt : add BR/EDR TX power set 2018-04-25 15:28:19 +08:00
Jiang Jiang Jian
d8c63160af Merge branch 'bugfix/btdm_fix_gatt_cache_error' into 'master'
Component/bt: fix gattc some errors

See merge request idf/esp-idf!2104
2018-04-25 14:57:18 +08:00
shangke
5fc130f2c0 update emac_reg_v2.h 2018-04-25 14:54:09 +08:00
Ivan Grokhotkov
0b1bb2ab57 Merge branch 'bugfix/fatfs_readwrite_test_failure' into 'master'
fatfs/test: increase stack size in read-write unit test

See merge request idf/esp-idf!2256
2018-04-24 23:43:24 +08:00
Ivan Grokhotkov
907248b6a7 Merge branch 'feature/nvs_coverage' into 'master'
NVS: add power off recovery and coverage test into CI

See merge request idf/esp-idf!2246
2018-04-24 23:42:00 +08:00
Ivan Grokhotkov
52f9a5ca16 Merge branch 'bugfix/sdspi_wp_cd_pins' into 'master'
sdmmc, sdspi: fix handling of CD and WP

See merge request idf/esp-idf!2285
2018-04-24 20:53:47 +08:00
Sagar Bijwe
21584827b3 dhcp/dhcpserver Fix max station limit check in dhcp server
Currently when MAX_STATION limit in DHCP config is set to N, dhcp server
issues only N-1 IP addresses. This is problematic from customer
perspective if both SoftAP MAX_STATION and DHCP MAX_STATION limit is set
to same value. With this change DHCP server can issue N addresses that
is inline with the set limit.

Closes TW<20556>
2018-04-24 17:36:55 +05:30
Ivan Grokhotkov
e0f1524c86 sdmmc: add tests for CD and WP pins for SD and SPI mode 2018-04-24 19:08:44 +08:00
Ivan Grokhotkov
e19901c898 sdmmc: don’t print sdio_reset warning when CD is idle 2018-04-24 19:08:44 +08:00
Ivan Grokhotkov
85ab4fc83e sdmmc host: add handling of CD and WP pins
Previous version of the code only connected CD and WP to the
peripheral, in fact the hardware does not use the values of these
signals automatically. This adds code to read CD and WP values when
command is executed and return errors if card is not present, or
write command is executed when WP signal is active.
2018-04-24 19:08:44 +08:00
Ivan Grokhotkov
829c6cef39 sdmmc host: when parameter validation fails, exit cleanly
This fixes lock-up which happened when sending a command, if the
previous command has failed.
2018-04-24 19:08:44 +08:00
Jiang Jiang Jian
edcaa5f300 Merge branch 'bugfix/minor_fix_for_wifi_tx' into 'master'
esp32: minor fix for WiFi TX

See merge request idf/esp-idf!2281
2018-04-24 13:42:41 +08:00
Mahavir Jain
7b50ed70a3 aws_iot: add support for MQTT TLS over port 443
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-23 18:27:28 +05:30
Ivan Grokhotkov
50304d719e Merge branch 'bugfix/esp_tls_error_logging' into 'master'
esp-tls: Expand error logging

See merge request idf/esp-idf!2284
2018-04-23 20:18:30 +08:00
Liu Zhi Fu
2461a780aa more 2018-04-23 19:09:46 +08:00
Ivan Grokhotkov
5a3b2eddd3 Merge branch 'bugfix/esp_tls_memory_leak' into 'master'
esp-tls: fix memory leak when using CA certification validation

See merge request idf/esp-idf!2283
2018-04-23 18:57:11 +08:00
Jiang Jiang Jian
cad88fb18c Merge branch 'bugfix/authmode_change_event_peg_core_in_wep_mode' into 'master'
bugfix/wrong_authmode_change_event_is_reported_in_wep_mode

See merge request idf/esp-idf!2282
2018-04-23 18:51:46 +08:00
zhiweijian
be107320f7 Component/bt: fix gatt cache error
- fix sev == NULL error
- fix start_handle == end_handle
2018-04-23 15:43:10 +08:00
Ivan Grokhotkov
92a16ac6e6 sdspi: fix CD and WP incorrectly configured as outputs 2018-04-23 14:35:40 +08:00
Ivan Grokhotkov
2a7d85cfa4 sdmmc, sdspi: fix initializers to be C++-compatible, add test
Closes https://github.com/espressif/esp-idf/issues/1861
Closes https://github.com/espressif/arduino-esp32/issues/1312
2018-04-23 14:35:13 +08:00
Deng Xin
aab573746e Bug fix of authmode change event peg core in wep mode
auth mode change event will report continous in wep mode due to wrong original auth record

close github issue https://github.com/espressif/esp-idf/issues/1804
2018-04-23 14:25:36 +08:00
Flavio Bayer
d477d3c5bd bugfix/sdspi_host.c: wrong CD/WP pin configuration
Looks like the configuration of CP and WP pins are wrong, since the check for `gpio_cd` and `gpio_wp` in `slot_config` seems to be swapped.
2018-04-23 11:32:42 +10:00
Angus Gratton
088c73bd22 Merge branch 'feature/disable_ble_service_change_pr1673' into 'master'
Add option to ena/dis BLE service change registration

See merge request idf/esp-idf!2210
2018-04-23 09:15:02 +08:00
Angus Gratton
f4241dc796 Merge branch 'bugfix/typo_in_aws_iot_config' into 'master'
Typo in aws_iot_config.h

See merge request idf/esp-idf!2280
2018-04-23 09:02:02 +08:00
Amit Sheth
aa357a32bc nvs_flash: Add binary creation support for NVS partition.
Ideally suited for generating a binary externally, containing key-value pairs specific
to device manufacturers. Utility allows creation of a binary, compatible
with NVS structure, which can be separately flashed onto a new
partition. This helps device manufacturers set different values for
different devices, e.g. serial numbers, but using a single firmaware
image.
2018-04-23 00:27:29 +05:30
Jiang Jiang Jian
e37ceaed32 Merge branch 'bugfix/tw18453_fix_ap_eapol_retry_bug' into 'master'
esp32: fix soft-AP eapol retry issue

See merge request idf/esp-idf!2264
2018-04-22 16:37:24 +08:00
Liu Zhi Fu
db5f927087 esp32: fix the bug that soft-AP fails to retry eapol
Fix the issue that soft-AP fails to retry eapol frame when multiple
stations connects it at the same time.

More
2018-04-22 10:19:31 +08:00
redchenjs
854c5260d4
esp-tls: fix memory leak when using CA certification validation 2018-04-22 01:13:09 +08:00
Kyle Secord
6807d80733 Typo in aws_iot_config.h
-breaks compilation when 'Override Shadow RX buffer size' is enabled via
menuconfig

Merges https://github.com/espressif/esp-idf/pull/1869
2018-04-20 19:32:52 +05:30
Wangjialin
b1dcb52fec feature(psram): configure flash and psram speed during runtime
1. Bootloader reads SPI configuration from bin header, so that the burning configuration can be different with compiling configuration.
2. Psram mode init will overwrite original flash speed mode, so that users can change psram and flash speed after OTA.
3. Flash read mode(QIO/DIO…) will not be changed in app bin. It is decided by bootloader, OTA can not change this mode.
4. Add read flash ID function, and save flash ID in g_rom_flashchip
5. Set drive ability for all related GPIOs
6. Check raise VDDSDIO voltage in 80Mhz mode
7. Add check flash ID and update settings in bootloader
8. Read flash ID once and keep in global variable
9. Read flash image header once and reuse the result

Tested cases:
1. Test new and old version of bootloader
boot Flash 20M —> app Flash 80M + Psram 80M
boot Flash 40M —> app Flash 80M + Psram 80M
boot Flash 80M —> app Flash 80M + Psram 80M
boot Flash 20M —> app Flash 80M + Psram 40M
boot Flash 40M —> app Flash 80M + Psram 40M
boot Flash 80M —> app Flash 80M + Psram 40M
boot Flash 20M —> app Flash 40M + Psram 40M
boot Flash 40M —> app Flash 40M + Psram 40M
boot Flash 80M —> app Flash 40M + Psram 40M
2. Working after esp_restart reboot.
2018-04-20 20:51:44 +08:00
Jitin George
d57495cb1c esp-tls: Fix HTTP2 failure
Closes https://github.com/espressif/esp-idf/issues/1874
2018-04-20 16:59:36 +05:30
Jiang Jiang Jian
c32ccf7abb Merge branch 'bugfix/add_NULL_value_check_bta_gattc_get_services' into 'master'
components/bt: Add NULL value check in bta_gattc_get_service_with_uuid()

See merge request idf/esp-idf!2212
2018-04-20 18:15:45 +08:00
Jiang Jiang Jian
1c06b44f08 Merge branch 'bugfix/bt_correct_inquiry_mode_name' into 'master'
components/bt: Correct the enquiry mode name

See merge request idf/esp-idf!2217
2018-04-20 18:14:57 +08:00
Jiang Jiang Jian
102d08fd79 Merge branch 'feature/btdm_gattc_cache' into 'master'
Feature/btdm gattc cache

See merge request idf/esp-idf!1083
2018-04-20 17:49:35 +08:00
Ivan Grokhotkov
22fbcd276c Merge branch 'feature/amazon_freertos_compat_v2' into 'master'
Changes for Amazon Freertos compatibility

See merge request idf/esp-idf!2123
2018-04-20 14:55:47 +08:00
Yulong
2c7182c59f component/bt: For unity, Change all the associat & associa to abbreviated form(assoc). 2018-04-20 02:16:33 -04:00
Ivan Grokhotkov
6185e722c3 Revert "Merge branch 'feature/vfs_select' into 'master'"
This reverts merge request !2074
2018-04-20 11:51:41 +08:00
Yulong
b940abca0e component/bt: Change the cache 'associat' name for unify. 2018-04-19 22:56:33 -04:00
Mahavir Jain
441b4a9742 esp32: fix few components with dependency on networking stack
* Move smartconfig to its component directory, it should be possible to override
  this as whole component
* Fix few header includes related to lwIP networking stack

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-19 18:28:55 +05:30
Mahavir Jain
43a12894ea driver/spi: add _ISR counterparts if invoked from interrupt for critical section
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-19 18:28:55 +05:30
Mahavir Jain
c65a08d2fb freertos: portCLEAN_UP_TCB should be performed before freeing tcb memory
Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-19 18:28:55 +05:30
Mahavir Jain
24ad64bfe4 pthread: implement local storage using pvTaskGetThreadLocalStoragePointer
If static task cleanup option is enabled, then before invoking application
defined `vPortCleanUpTCB` hook, pthread specific cleanup is performed.

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-19 18:28:55 +05:30
Ivan Grokhotkov
2d598d6fb7 esp_timer: use _ISR version of port{ENTER,EXIT}_CRITICAL from ISR 2018-04-19 18:28:55 +05:30
Ivan Grokhotkov
41ae0fe52b newlib: define _REENT_INIT_PTR correctly for ESP_PLATFORM 2018-04-19 18:28:55 +05:30
Ivan Grokhotkov
573ea385b4 multi_heap: use portENTER/EXIT_CRITICAL instead of taskENTER/EXIT_CRITICAL 2018-04-19 18:28:55 +05:30
Ivan Grokhotkov
f65870566a crosscore_int: use _ISR version of portENTER/EXIT_CRITICAL in ISR 2018-04-19 18:28:55 +05:30
Jiang Jiang Jian
5d3b26e8d0 Merge branch 'feature/mesh' into 'master'
mesh: update mesh libs

See merge request idf/esp-idf!2244
2018-04-19 20:24:16 +08:00
Ivan Grokhotkov
6f504deed0 nvs: run all test by default, exclude long tests by tag
Reduces the chance of new tests being skipped in CI
2018-04-19 15:08:08 +08:00
Ivan Grokhotkov
f8cb95d0b8 nvs: print progress in nvs API tests, reduce number of iterations 2018-04-19 15:08:08 +08:00
Ivan Grokhotkov
88d0d6ffb0 Merge branch 'feature/vfs_select' into 'master'
Allow VFS file descriptors in select()

See merge request idf/esp-idf!2074
2018-04-19 15:06:02 +08:00
Ivan Grokhotkov
b297b72abb Merge branch 'bugfix/fix_gpio_install_isr_service_check_value' into 'master'
driver(gpio): modify return value when gpio ISR service already exists.

See merge request idf/esp-idf!2125
2018-04-19 15:01:50 +08:00
Ivan Grokhotkov
fbb3610c0b Merge branch 'feature/bootloader_refactoring_common' into 'master'
bootloader: Refactoring

See merge request idf/esp-idf!2251
2018-04-19 14:58:00 +08:00
Ivan Grokhotkov
bc4c201e20 Merge branch 'bugfix/fix_github_reported_1841_and_1845' into 'master'
Fix few minor github reported issues

See merge request idf/esp-idf!2252
2018-04-19 12:59:37 +08:00
Yulong
ece6bd9b82 component/bt: Change the btc gattc callback function with the compile error.
1. Change all the gattc API && bta gattc layer.
2. Debug the code and change the btc_ble_gattc_get_db method.
3. Change the gatt read API interface.
4. Reconstruction the BTA_gattc_cache code.
5. Change back the bluedroid_get_status to marco.
6. Change the gattc docs format.
7. Change the docs format.
8. fix the read char value bug.
9. change the gattc_get_attr_count method.
10. Change back the bta_gattc write ccc code.
11. Change the gattc api docs format
12. Change the gattc API docs.
13. Change the prepare write descriptor method to avoid the exection.
14. modify gatt clinet demo with new API
15. Change the p_src_data->read.p_value to avoid exection.
16. Change the bugfix of gattc unreg for the notify.

    component/bt: Added the serch service res start_handle & end_handle to the result.

component/bt: Added the bta_gattc_cache_write when gatt discovery complete.

component/bt: Added the bta_gattc_cache_write declaration.

component/bt: Added the comments for esp_ble_gattc_cache_refresh API.

component/bt: Change the spelling errors & some comment error.

component/bt: fix bug of get gattc cache address list error.

1. Change the esp_bluedroid_get_status to macro;
2. added the malloc & free for the get_addr_list

component/bt: Added the addr_info->ass_addr == NULL Judgment to prevent crashes in the bta_gattc_co_cache_find_src_addr function.

component/bt: Fixed following gattc cache bugs

1. gattc can't refresh the gattc cache in the gatt discover state;
2. remove the nvs_get_blob in the cache address init function;
3. added the nvs_set_blob return value judgment in the cache address save function;
4. added the list_new when ass_address is NULL;
5. Change the ass_address list remove method to fix the ass address can't remove bug.
2018-04-19 12:05:13 +08:00
Angus Gratton
04103e96f5 esp-tls: Log errors for all "connection failed" code paths 2018-04-19 11:34:27 +10:00
Angus Gratton
507ca8196c esp-tls: Allow esp_tls_conn_delete() to be called with a NULL pointer 2018-04-19 11:34:06 +10:00
Ivan Grokhotkov
cbd7431d94 fatfs/test: increase stack size in read-write unit test
2048 byte stack was not sufficient when some error was logged by SD
card driver, leading to stack overflows.
2018-04-18 14:35:21 +08:00
Angus Gratton
fe907bde60 Merge branch 'bugfix/heap_tracing_newlib_allocations' into 'master'
heap tracing: Fix tracing of newlib internal allocations

See merge request idf/esp-idf!1992
2018-04-18 12:07:15 +08:00
Ivan Grokhotkov
b76c9ef706 Merge branch 'feature/esp-tls' into 'master'
esp-tls: Fix connection failure

See merge request idf/esp-idf!2241
2018-04-18 11:11:49 +08:00
Ivan Grokhotkov
17ab60d642 Merge branch 'bugfix/nvs_failed_crc_assert' into 'master'
nvs: don’t expect items with bad CRC to be in cache

See merge request idf/esp-idf!2239
2018-04-18 11:01:21 +08:00
qiyueixa
899f2fa1ed mesh: update mesh libs
1. fix issues on sending beacon caused by too much tx retries on other packets.
2. modify not to scan if rc exists when connect.
3. modify scan dwell time to default 120ms fo root.
2018-04-17 11:49:54 +00:00
Konstantin Kondrashov
86256b3541 bootloader: Refactoring
Need to make the bootloader modular so that users can redefine its functional part.

- refactoring and moving functions to the bootloader_support component
- Changed function to `void` bootloader_utility_load_image(...);

TW19596
2018-04-17 16:36:49 +05:00
Roland Dobai
6852d653bd Allow VFS file descriptors in select() 2018-04-17 11:25:30 +02:00
Sagar Bijwe
9a3c4b7134 nvs: Fix recovery after power-off during erase operation
Current code for recovery after power-off do not clean-up partially
erased items for FULL pages. If the erasure was part of modification
operation, this gets luckily cleaned-up because of duplicate detection
logic. For erase-only operation, the problem still exists. This patch
adds the recovery for FULL pages also.

Closes TW<20284>
2018-04-17 12:24:21 +05:30
Jiang Jiang Jian
16ad81c636 Merge branch 'feature/btdm_get_and_set_cod' into 'master'
component/bt: Add API: get cod & set cod

See merge request idf/esp-idf!2127
2018-04-17 14:21:18 +08:00
Jiang Jiang Jian
a3cfbdb150 Merge branch 'bugfix/btdm_a2dp_source_cleanup_bug' into 'master'
component/bt: Fix bug of a2dp source cleanup bug when connected

See merge request idf/esp-idf!2042
2018-04-17 14:20:15 +08:00
Jiang Jiang Jian
0d55f2cb7b Merge branch 'bugfix/btdm_add_assert_when_no_device_name' into 'master'
component/bt: Fix exception when there is no device name

See merge request idf/esp-idf!2184
2018-04-17 14:19:39 +08:00
Mahavir Jain
60ab582ba6 bt: fix incorrect comments for error codes
Closes https://github.com/espressif/esp-idf/issues/1845

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-17 10:44:48 +05:30
Mahavir Jain
959c677025 rtc_module: fix build failure if assertions are disabled
Closes https://github.com/espressif/esp-idf/issues/1841

Signed-off-by: Mahavir Jain <mahavir@espressif.com>
2018-04-17 10:44:48 +05:30
Konstantin Kondrashov
6a4033b8a7 nvs: fix nvs_get_stats unit test
Changed check for the returned parameter from ESP_ERR_NVS_PART_NOT_FOUND to ESP_ERR_NVS_NOT_INITIALIZED.
2018-04-16 13:28:45 +00:00
He Yin Ling
c36687aac6 Merge branch 'test/fix_ci_test_fail_in_jap_case' into 'master'
test: fix CI fail when join AP

See merge request idf/esp-idf!2245
2018-04-16 19:02:46 +08:00
Ivan Grokhotkov
2c3644a09f nvs: don’t expect items with bad CRC to be in cache
When erasing a variable length item with an incorrect CRC32, the span
value of the item can not be trusted, so the item will be erased with
span = 1. Subsequent entries represent the data of the variable
length item, and these will be treated as separate items. For each
entry CRC32 is checked, the check most likely fails (because the
entry contains arbitrary data, and not a proper NVS item), and the
entry is erased. Erase function assumed that every item should be
present in cache, but it is not the case for the entries which are
just parts of item’s payload. This change allows for the item to be
not found in the hashlist, if the CRC32 check fails.
2018-04-16 09:36:17 +00:00
Ivan Grokhotkov
fc1e944f59 Merge branch 'bugfix/nvs_stat_test' into 'master'
NVS: fix nvs_get_stats unit test

See merge request idf/esp-idf!2248
2018-04-16 14:45:43 +08:00
Ivan Grokhotkov
d3fd00c049 Merge branch 'bugfix/spi_miso_on_input_only_pins' into 'master'
fix(spi): allow to use MISO on GPIO34-39.

See merge request idf/esp-idf!2136
2018-04-16 14:39:02 +08:00
Ivan Grokhotkov
20405fbbcc nvs: make nvs_flash_deinit useable from unit tests 2018-04-16 14:06:52 +08:00
Ivan Grokhotkov
fa3bd16d75 nvs: deinit NVS in nvs_stats unit test
This fixes the failure when this test runs after another test which
leaves NVS initialized.
2018-04-16 12:50:57 +08:00
Ivan Grokhotkov
d0d314d8f8 Merge branch 'bugfix/nvs_page_selection' into 'master'
nvs: Fix page selection algo to consider free entry counts as well

See merge request idf/esp-idf!2240
2018-04-16 10:32:01 +08:00
Ivan Grokhotkov
5029eb4b3b Merge branch 'feature/nvs_get_count_used_entries' into 'master'
NVS: add API to get used entries count

See merge request idf/esp-idf!1982
2018-04-16 10:25:01 +08:00
He Yin Ling
7cfd08deca test: fix join AP fail during AP power on 2018-04-16 09:27:46 +08:00
Angus Gratton
8b3fda99f5 Merge branch 'feature/uart_add_api_get_cmd_position' into 'master'
driver(uart): Add API to get the position of cmd_char

See merge request idf/esp-idf!2177
2018-04-16 08:03:25 +08:00
Ivan Grokhotkov
9c7207ed3c Merge branch 'bugfix/soc_clk_out_fields' into 'master'
soc/io_mux: make CLK_OUT fields compatible with REG_SET/GET_FIELD

See merge request idf/esp-idf!2133
2018-04-13 19:42:20 +08:00
Jitin George
0d0445103b esp-tls: Fix connection failure when esp-tls config is empty 2018-04-13 16:58:19 +05:30
Jiang Jiang Jian
c17b59ebe1 Merge branch 'feature/mesh' into 'master'
mesh: update mesh libs

See merge request idf/esp-idf!2218
2018-04-13 18:55:39 +08:00
Sagar Bijwe
7e79471ece nvs: Fix page selection algo to consider free entry counts as well
Current page selection algorithm selects a page for compaction based on just erased counts
and gives up when it does not find any page with erased count greater than 0. This is
problematic since the current allocation procedure skips the active page if there is not
enough room for the item in that page leaving free chunks on the pages. This change modifies
the algorithm to consider both erased as well as free counts on the candidate pages.

Closes TW<20297>
2018-04-13 14:49:05 +05:30
konstantin
c93626db3f nvs:Add functions for calculating used/free entries
Users needs functions to count the number of free and used entries.

1. `nvs_get_stats()` This function return structure of statistic about the uspace NVS.
(Struct: used_entries, free_entries, total_entries and namespace_count)
2. `nvs_get_used_entry_count()` The second function return amount of entries in the namespace (by handler)
3. Added unit tests.

Closes TW<12282>
2018-04-13 10:34:13 +05:00
Wang Jia Lin
6c44fc70bc Merge branch 'feature/gpio_add_hold_support' into 'master'
driver(gpio):   Add api support digital pad hold function

See merge request idf/esp-idf!2186
2018-04-13 12:18:44 +08:00
qiyueixa
92fd4c42e1 mesh: update mesh libs
1. fix a bug in initliazing map beacon interval.
2. fix not send MESH_EVENT_ROUTING_TABLE_REMOVE when MESH_NWK_CHILD_DISCONNECTED.
3. fix a bug in returning roots ie len.
2018-04-13 11:52:31 +08:00
Michael (Xiao Xufeng)
45f8bcf3f8 fix(spi): allow using MISO on GPIO34-39
Breaking Changes: arguments of ``spicommon_bus_initialize_io`` are changed.

Closes https://github.com/espressif/esp-idf/issues/1736.
2018-04-12 17:01:38 +08:00
Michael (Xiao Xufeng)
77629129c0 chore(spi): update the return value of spi init functions 2018-04-12 17:01:38 +08:00
Michael (Xiao Xufeng)
dceb3452c7 doc(spi_master): format the documentation of several fields and macros in spi_master.h 2018-04-12 17:01:37 +08:00
Angus Gratton
234723c061 Merge branch 'feature/pcnt_add_isr_manage_apis' into 'master'
Driver(pcnt) :  Add new feature that each unit can  has it's own interrupt handler.

See merge request idf/esp-idf!2086
2018-04-12 09:06:56 +08:00
Angus Gratton
c626a8fe74 Merge branch 'feature/build_out_of_tree_srcs' into 'master'
make: Build out of tree component srcs under component build dir

See merge request idf/esp-idf!2190
2018-04-12 08:49:56 +08:00
Jiang Jiang Jian
12dbe4dac5 Merge branch 'feature/btdm_add_set_local_icon_api' into 'master'
Component/bt: add set gap icon API

See merge request idf/esp-idf!2129
2018-04-11 20:48:13 +08:00
Jiang Jiang Jian
6b7ad6b707 Merge branch 'bugfix/btdm_do_not_update_conn_params_when_have_key_in_slave' into 'master'
Component/bt: do not update connection params when already have keys in slave

See merge request idf/esp-idf!2176
2018-04-11 20:47:27 +08:00
kooho
2236249555 driver(pcnt): Add some APIs to support each unit can have it's own interrupt handler. 2018-04-11 16:15:09 +08:00
Ivan Grokhotkov
bdadd95dd7 Merge branch 'feature/wwrite_string_for_idf' into 'master'
Enable -Wwrite-strings when compiling IDF's own C files

See merge request idf/esp-idf!2193
2018-04-11 14:59:08 +08:00
Ivan Grokhotkov
bae9709a79 Merge branch 'feature/sdio_master' into 'master'
SDIO master driver

See merge request idf/esp-idf!2008
2018-04-11 12:38:42 +08:00
Ivan Grokhotkov
c6829fa5b8 sdmmc: improve error handling during SPI mode init
- In SPI mode, the card will respond to the initial SDIO reset (done
using CMD52) with “invalid command” error. Handle this correctly.

- sdmmc_card_init had a hack where GO_IDLE_STATE (CMD0) command was
sent twice. Add explanation why this is done, and don’t expect
correct response from the card on first CMD0.

- improve logs printed at debug level by adding CMD index
2018-04-11 11:11:17 +08:00
Ivan Grokhotkov
ee600784c5 sdmmc: add SDIO support
- Add SDIO support at protocol layer (probing, data transfer, interrupts)
- Add SDIO interrupts support in SDMMC host
- Add test (communicate with ESP32 in SDIO download mode)
2018-04-11 11:07:13 +08:00
Ivan Grokhotkov
5f97e6bebb sdmmc: fill as many DMA descriptors as possible 2018-04-11 11:06:50 +08:00
Ivan Grokhotkov
20a8c3318a sdmmc: do expect CMD_DONE interrupt after response timeout
Existing code assumed that response timeout is not followed by CMD_DONE,
which was not true, in fact. Host datasheet states that CMD_DONE is sent
after an RTO.
2018-04-11 11:06:50 +08:00
Ivan Grokhotkov
01cd2fce73 sdmmc: print error status only once 2018-04-11 11:06:50 +08:00
Ivan Grokhotkov
5fc6fb58ea sdmmc: don't whitelist the opcodes when handling response timeout
All the commands which do not have a response must have their flags set
accordingly. Therefore the host will not send RTO interrupt if response
is not expected. It is a bug in the code logic if it happens otherwise.
2018-04-11 11:06:50 +08:00
Ivan Grokhotkov
f02cff13cc sdmmc: set highest possible host clock divider
SDMMC host suffers from an issue that it outputs data near the rising
edge of the card clock, which is the edge used by the card to sample
data. If sampling time constraint is not satisfied, card may read data
after the transition.

The phases of output/input data can, in fact, be adjusted. However this
adjustment happens in the clock generation block outside of the host.
So the maximum phase change which can be created this way is equal to
half of the host clock period. So if the host clock is set to the lowest
possible frequency (for the given card frequency), then the phase offset
(and hence the hold time) will be the highest. This change modifies the
logic used to determine clock dividers accordingly.

sdmmc host: set correct dout phase and print correct frequency
2018-04-11 11:06:50 +08:00
Ivan Grokhotkov
84d6793f77 sdmmc: don't set data_expected on SET_BUS_WIDTH command
SET_BUS_WIDTH is not a data transfer command. Extensive search in the
host datasheet and SD card spec did not reveal the origin of this hack
or 'feature'. Further testing showed that removing this does not lead to
regressions.
2018-04-11 11:06:50 +08:00
Ivan Grokhotkov
42de5fb76d sdmmc: send init sequence before CMD0 2018-04-11 11:06:50 +08:00
Ivan Grokhotkov
907fc1167a gpio: add special GPIO signal values 2018-04-11 11:06:50 +08:00
huchaoru
f409a33653 test: update ci test case 2018-04-10 14:08:10 +00:00
Hrishikesh Dhayagude
9c41c93f5f components/bt: Correct the enquiry mode name
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-10 17:58:11 +05:30
Ivan Grokhotkov
2522c1b2f9 Merge branch 'bugfix/rtc_clk_fixes' into 'master'
Power management and RTC fixes

See merge request idf/esp-idf!2131
2018-04-10 18:17:02 +08:00
baohongde
52dbcef908 component/bt: Fix exception when there is no device name 2018-04-10 17:55:33 +08:00
Roland Dobai
744c2dcdd9 Resolve problems found by enabling -Wwrite-strings compilation flag 2018-04-10 08:53:43 +02:00
Angus Gratton
f7b7b4ef59 Merge branch 'bugfix/mdns_fixes' into 'master'
MDNS: Fix some issues when hostname is not set or services are removed

See merge request idf/esp-idf!2179
2018-04-10 13:43:02 +08:00
Angus Gratton
2914111c8c Merge branch 'bugfix/heap_fragmentation_on_split_pr1761' into 'master'
heap: Try to merge tail with next block when splitting

See merge request idf/esp-idf!2147
2018-04-10 12:14:57 +08:00
Hrishikesh Dhayagude
284f332f06 components/bt: Add NULL value check in bta_gattc_get_service_with_uuid()
Signed-off-by: Hrishikesh Dhayagude <hrishi@espressif.com>
2018-04-10 09:34:03 +05:30
kooho
ccf09c3b39 driver(gpio): Add api support digital pad hold function. 2018-04-10 11:31:59 +08:00
Ing. Jaroslav Safka
801632d68b bt: Add option to ena/dis BLE service change registration
Add option to enable/disable automatic registration of BLE Gattc
service change notify. Which sends in parralel
(with user message flow) commands to BLE server which
sometime leads to GATT_BUSY.
(BLE server is able to handle only one command at time)

Closes https://github.com/espressif/esp-idf/issues/1575

Merges https://github.com/espressif/esp-idf/pull/1673
2018-04-10 12:27:33 +10:00
Angus Gratton
2bfef060ba Merge branch 'bugfix/small_fixes_from_github' into 'master'
Bugfix/small fixes from github

See merge request idf/esp-idf!2200
2018-04-10 09:19:19 +08:00
Angus Gratton
58ed6cc9af Merge branch 'bugfix/wifi_ps_modem' into 'master'
wifi: Add WIFI_PS_MODEM for backwards compatibility with V3.0 API

See merge request idf/esp-idf!2203
2018-04-10 09:18:53 +08:00
baohongde
789edc0b52 component/bt: Add API: get cod & set cod
In response to: https://github.com/espressif/esp-idf/issues/1565
2018-04-09 19:25:26 +08:00
Angus Gratton
97a382077f wifi: Add WIFI_PS_MODEM for backwards compatibility with V3.0 API 2018-04-09 16:55:38 +10:00
me-no-dev
421c6f154b Fix exception when service is removed while there are pending packets that depend on it 2018-04-09 09:40:08 +03:00
Tian Hao
1bde34c1f1 component/esp32 : remove pm gpio dbg 2018-04-09 14:33:48 +08:00
Ivan Grokhotkov
b11209b070 Merge branch 'feature/esp-tls' into 'master'
feature/add simplified TLS socket APIs

See merge request idf/esp-idf!1951
2018-04-09 14:25:21 +08:00
Anton Maklakov
046ff2e628 Make error codes looks like literals in the code of them (easy for searching). Minor fixes, typos 2018-04-09 13:54:18 +10:00
Ing. Jaroslav Šafka
3d89c8ba74 rmt: Fix LoadProhibited on RX END
Fixes exceptions LoadProhibited, when rmt tries read variable p_rmt on RX END which can be 0.
It happens after esp_reset()  (OTA) and the rmt is not probably stopped by it.
In other words the routine rmt_driver_isr_default was called before second rx channel was registered.

scenario:
register tx channel
register rx channel
reboot
register tx channel
-> exception (because rx channel is accessed)

Merges https://github.com/espressif/esp-idf/pull/1671
2018-04-09 12:29:05 +10:00
Mixerito
9f39411e80 esp32: get_chip_info_esp32() return correct model number
out_info->model was zeroed by memset

Merges https://github.com/espressif/esp-idf/pull/1760
2018-04-09 12:28:23 +10:00
Fredrik
97c6a94a03 Bugfix GPIO_DIS_OUTPUT to work with pin 32 and up
Merges https://github.com/espressif/esp-idf/pull/1796
2018-04-09 12:28:23 +10:00
Jitin George
b09c3e9878 mbedtls integration in esp-tls 2018-04-06 17:16:27 +05:30
Jitin George
30b50cbfb3 esp-tls header file name change 2018-04-06 17:16:27 +05:30
Jitin George
e29294b49a Resolved Issues 2018-04-06 17:16:27 +05:30
Jitin George
8a1dcc0765 CA Certificate verification 2018-04-06 17:16:27 +05:30
Kedar Sovani
8211a16207 Use esp-tls in the http2 example 2018-04-06 17:16:27 +05:30
Kedar Sovani
070884fc2e Include error log in case of error 2018-04-06 17:13:14 +05:30
Kedar Sovani
433bd8c91c Minor fixes 2018-04-06 17:13:14 +05:30
Kedar Sovani
1c72c8d126 Supports TLS with HTTP2 client 2018-04-06 17:13:14 +05:30
Kedar Sovani
eb051fe72f Minor fixes 2018-04-06 17:13:14 +05:30
Anuj Deshpande
adbcaf8938 Cast to remove warnings 2018-04-06 17:13:14 +05:30
Kedar Sovani
e45024e088 Don't use 'port' number for DNS query
- In some cases where the HTTP URL contains the port number
(http://hostname:334), the DNS querier fails to resolve the hostname.
- Hence we have to populate the port number ourselves.
- This can only be done based on whether we get an IPv4 or IPv6
  address.
2018-04-06 17:13:14 +05:30
Kedar Sovani
306d59d32c Make read/write function pointers
as per Ivan's feedback
2018-04-06 17:13:14 +05:30
Kedar Sovani
7f35c4ff3e esp-tls: Basic structure
Purpose:
1. TLS calls can be too many, and require a user to know the expected behaviour. A simple TLS socket wrapper that can be used in any higher level protocol.
2. Uses OpenSSL compatibility layer, so applications using esp-tls can be built on the host, and it should just work on ESP
2018-04-06 17:13:14 +05:30
Angus Gratton
5b05a1f822 make: Build out of tree component srcs under component build dir
Strips leading ../ when generating object file paths, keeps these in sync with the source files
otherwise.

This prevents object files landing in other directories, including outside the build directory, if
the component_srcdirs start with ../
2018-04-06 13:10:19 +10:00
Xia Xiaotian
e727582180 Fix two WiFi and LWIP typos
1. close github issue: https://github.com/espressif/esp-idf/issues/1792
    2. close github issue: https://github.com/espressif/esp-idf/issues/1781
2018-04-05 11:46:42 +08:00
qiyueixa
2984cdbbe3 add mesh feature 2018-04-04 22:57:45 +08:00
Jiang Jiang Jian
c842725be0 Merge branch 'bugfix/pm_coex_minor_things' into 'master'
Bugfix/pm coex minor things

See merge request idf/esp-idf!2180
2018-04-04 17:54:40 +08:00
Ivan Grokhotkov
1a302cbac1 Merge branch 'bugfix/open_uart_non_blocking' into 'master'
Make UART non-blocking when the file descriptor was opened with the O_NONBLOCK flag

See merge request idf/esp-idf!2153
2018-04-04 14:43:31 +08:00
Angus Gratton
53234ef2bc Merge branch 'refactor/rtc_split_module' into 'master'
bugfix(rtc): make sure peripherals (DAC, HALL) are turned off before conversion.

See merge request idf/esp-idf!1848
2018-04-04 09:00:58 +08:00
Tian Hao
58e7464dc0 component/esp32 : clear some minor thingsw about PM and coexistence 2018-04-03 20:13:49 +08:00
Ivan Grokhotkov
595ddfd825 Merge branch 'feature/build_ssc_in_multiple_ci_jobs' into 'master'
CI: support build SSC in multiple jobs

See merge request idf/esp-idf!1622
2018-04-03 18:20:38 +08:00
Ivan Grokhotkov
139d49894c Merge branch 'feature/deactivate_wakeup_trigger' into 'master'
esp32: Add deactivation of wake up trigger for different sources

See merge request idf/esp-idf!2079
2018-04-03 15:19:10 +08:00
Angus Gratton
3ccb12530b heap: Change test_multi_heap_on_host multi-config to bash script not Makefile
Hopefully fix some CI building issues with parallel builds.
2018-04-03 16:34:02 +10:00
kooho
305c788c60 driver(uart): Add API to get the position of cmd_char 2018-04-03 12:34:16 +08:00
Deomid Ryabkov
4b7eb1792e Try to merge tail with next block when splitting
When splitting a memory block, check if the next block is free.
If it is, then just extend it upwards instead of creating a new block.
This fixes a bug where when shrinking existing allocations would result in irreversible free space fragmentation.

When testing on the host, test all the poisoning configurations.
2018-04-03 12:30:52 +10:00
Jiang Jiang Jian
393f3da37c Merge branch 'feature/btdm_add_get_local_used_addr_API' into 'master'
Component/bt: add esp_ble_gap_get_local_used_addr() API

See merge request idf/esp-idf!2137
2018-04-02 22:28:00 +08:00
Jiang Jiang Jian
7133e14eee Merge branch 'feature/wifi_bt_new_coex' into 'master'
Feature/wifi bt new coex

See merge request idf/esp-idf!2087
2018-04-02 22:20:31 +08:00
zhiweijian
a6c79cfe0f Component/bt: do not update connection params when already have keys in slave 2018-04-02 19:44:09 +08:00
He Yin Ling
3b3ad875c4 test: use SSC_BLE_WIFI to test NVS cases 2018-04-02 18:13:52 +08:00
Ivan Grokhotkov
aca0008694 Merge branch 'bugfix/sdspi_init_v1_card' into 'master'
sdspi: compatibility fixes for SD v1.0 cards

See merge request idf/esp-idf!1927
2018-04-02 13:48:46 +08:00
island
9b7454de0c support wifi&bt coexist (v0.9.1)
1. refactor wifi modem sleep
2. refactor wifi and bt phy enable/diable coexistence
3. support wifi&bt coexist (v0.9.1)
3. add coex pause resume
4. fix bt library interrupt reaction slowly
5. make a2dp more smooth when coex
6. add coexist preference option
7. Make CI do not check libcoexist.a printf/ets_printf
8. disable Wifi RX AMPDU when software coexistence enable && update wifi lib
9. bluetooth call modem sleep api
2018-04-02 13:44:48 +08:00
Ivan Grokhotkov
d6b1d0bb3d fatfs/test: enable tests on SD card 2018-04-02 10:57:45 +08:00
Jiang Jiang Jian
8eaae96658 Merge branch 'bugfix/flash_mapp' into 'master'
spi_flash: add api to get valid mmu table pages number

See merge request idf/esp-idf!2070
2018-03-30 19:32:35 +08:00
Jiang Jiang Jian
f46ad1fec8 Merge branch 'bugfix/btdm_fix_get_PID_key_error' into 'master'
Component/bt: fix get PID key error

See merge request idf/esp-idf!2156
2018-03-30 19:26:31 +08:00
Ivan Grokhotkov
e20e64ace9 fatfs/test: use 16k cluster size to speed up formatting 2018-03-30 18:49:42 +08:00
Ivan Grokhotkov
4a2489b99a sdspi: fix compatibility issue in multi block read
SDSPI driver optimized polling of the response tokens by requesting
two extra bytes on top of the block size (512) and CRC (2), and
checking whether these bytes contained the data response token or
not. In case the token was there, further polling would not need to
happen, thereby reducing latency between two consecutive blocks
transferred. However this caused compatibility issues when these two
extra bytes were sent after reading the final block. When
STOP_TRANSMISSION command was sent, these extra two bytes were
treated as part of the command, causing an invalid command error.

This fixes the logic by only requesting extra two bytes if the block
being read is not the final block. In addition to that, more strict
error checking is implemented for command response tokens.
2018-03-30 18:49:42 +08:00
Ivan Grokhotkov
229f67b816 sdspi: handle delayed R1 responses for data read commands 2018-03-30 18:49:42 +08:00
Ivan Grokhotkov
bbbdec24d9 sdspi: handle error flags for R3/R7 responses
Previously error flags were only handled for R1 responses. This change
moves error handling into a separate function and calls it for R1/R3/R7.
2018-03-30 18:49:42 +08:00
zhiweijian
99872beb6a Component/bt: add set gap icon API 2018-03-30 09:21:53 +00:00
Jiang Jiang Jian
e6d6deebc7 Merge branch 'bugfix/btdm_fix_connect_fail_when_remote_addr_is_random' into 'master'
Component/bt: modify open API params

See merge request idf/esp-idf!2116
2018-03-30 17:00:19 +08:00
Jiang Jiang Jian
21099c10f4 Merge branch 'feature/support_enrollee_feature_in_APSTA_mode' into 'master'
feature/support WPS enrollee in APSTA mode

See merge request idf/esp-idf!2120
2018-03-30 16:14:43 +08:00