Commit graph

3830 commits

Author SHA1 Message Date
Roland Dobai 6852d653bd Allow VFS file descriptors in select() 2018-04-17 11:25:30 +02: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 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
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
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
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
kooho ccf09c3b39 driver(gpio): Add api support digital pad hold function. 2018-04-10 11:31:59 +08: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
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