Commit graph

882 commits

Author SHA1 Message Date
Krzysztof 9858fde4a2 New items to documentation TOC
- Style Guide
- UART API
2016-11-10 22:47:29 +01:00
Krzysztof 48a976ddbf Fixed link so it can render by Sphinx 2016-11-10 22:44:59 +01:00
Krzysztof c6073cb5de Conform Style Guide 2016-11-10 22:44:09 +01:00
Krzysztof 08fd07a1ef Merge remote-tracking branch 'refs/remotes/espressif/master' 2016-11-10 19:44:05 +01:00
Krzysztof 71940dd0ce Merge remote-tracking branch 'refs/remotes/espressif/master' 2016-11-10 19:43:17 +01:00
Jeroen Domburg eb067ce908 Merge branch 'driver_merge_tmp/merge_uart' into 'master'
Add UART driver

1. add uart.h and uart.c
2. add ESP_ERR_TIMEOUT in esp_err.h
3. add UART AHB FIFO address in uart_reg.h
4. modify xRingbufferSendFromISR return value in ringbuffer.c
5. add #include "soc/gpio_sig_map.h" in gpio.h

See merge request !146
2016-11-10 18:11:21 +08:00
Wangjialin 4f4c9030fd Fix uart tx bug, data pass(with flow control) through test ok. 2016-11-10 17:01:39 +08:00
Ivan Grokhotkov 3269653b94 Merge branch 'bugfix/nvs_lookup_failure' into 'master'
nvs: fix Page::findItem and Storage::findItem regression

When read caching was added, Page::findItem started modifying itemIndex reference argument even if item wasn't found.
Incidentally, Storage::findItem reused itemIndex when starting search at next page.
So,
- if the first page had a cached index (findItem was called for that page), and it pointed to a non-zero index,
- first page has a few empty items at the end (but is marked full),
- next search looked up the item on the second page,
- index of the item on the second page was less than the cached index on the first page,

then the search would fail because cached starting index was reused.

This change fixes both sides of the problem:
- Page::findItem shouldn't modify itemIndex argument if item is not found
- Storage::findItem should not reuse itemIndex between pages

Two tests have been added.

ref. TW8406

See merge request !171
2016-11-10 16:58:39 +08:00
Ivan Grokhotkov e94ef1d56e Merge branch 'feature/docs_update' into 'master'
Feature/docs update

https://github.com/espressif/esp-idf/pull/77
Update to the API documentation, links fix, instructions for writing documentation.
Replaces !173.

See merge request !180
2016-11-10 16:58:27 +08:00
Wangjialin 6fb2515a5d Merge branch 'master' into driver_merge_tmp/merge_uart
# Conflicts:
#	components/esp32/include/esp_err.h
2016-11-10 11:57:19 +08:00
Ivan Grokhotkov fcba7e278d Merge branch 'bugfix/github_issues' into 'master'
Fixes for github issues

This MR contains a bunch of small fixes for issues raised on Github and esp32.com forum:

- vfs doesn't check error code returned by open syscall
- spi_flash doesn't work when built in release mode
- duplicate definition of O_NONBLOCK when combining LwIP socket.h with sys/fcntl.h
- wrong order of creation of standard streams
- `_times_r` returning incorrect values, causing `clock`to return double of the actual time
- driver/gpio.h: comment fix
- wifi event handlers: fix incorrect MAC address printed by logging statements
- move some functions out of IRAM when compiling for bootloader

Please check commit descriptions for links to issues/forum posts and more details.


See merge request !183
2016-11-09 10:12:25 +08:00
Angus Gratton 0dff62051f Merge branch 'bugfix/compile_with_no_timers' into 'master'
newlib: fix compilation error when no timers are enabled in menuconfig

I have checked that three options (RTC/RTC+FRC1/FRC1) work, but didn't check "None" option.
This adds some missing ifdef blocks to remove "unused function/variable" warnings and fixes the use of `__errno_r` in a non-reentrant function.

See merge request !174
2016-11-09 09:21:23 +08:00
Ivan Grokhotkov cc072f1d8a wpa_supplicant: clean up unused variable warning 2016-11-08 20:26:12 +08:00
Angus Gratton c5793521a0 build system: Fix bootloader-flash target
ESP32 forum thread: http://esp32.com/viewtopic.php?f=2&t=407&p=1902#p1902
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 81b18aa8d5 bootloader: move some functions out of IRAM when building in bootloader mode
Fixes https://github.com/espressif/esp-idf/issues/80
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 1e4f185d29 wifi: use MACSTR and MAC2STR in logging statements
Fixes https://github.com/espressif/esp-idf/issues/49
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov f142da3ced driver/gpio: fix interrupt type names in comment block
https://github.com/espressif/esp-idf/issues/56
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov d29935b9ce newlib: fix _times_r syscall implementation
tms_cstime should only take system time in child processes into account, so has to be zero.
https://github.com/espressif/esp-idf/issues/81
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 6dd3681115 fix order of creation of standard streams
With existing order, file descriptors assigned to stdin, stdout, stderr didn't match standard assignment.
https://github.com/espressif/esp-idf/issues/67
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 3f8d9d71e2 lwip: fix duplicate definition of O_NONBLOCK
LwIP will define O_NONBLOCK in sockets.h if it isn't defined yet.
If sys/fcntl.h is included after socket.h, there will be duplicate definition.
Work around by including sys/fcntl.h into lwipopts.h.

https://github.com/espressif/esp-idf/issues/75
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov aa0cd0ab47 spi_flash: add missing volatile qualifier for lock flags
http://esp32.com/viewtopic.php?f=14&t=419&p=1901
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 13b3c916f3 vfs: check error code returned by FS driver open function
Fixes https://github.com/espressif/esp-idf/issues/78
2016-11-08 20:17:08 +08:00
Wu Jian Gang cdebf24954 Merge branch 'feature/tw8193_add_wifi_api_detail_return_code' into 'master'
esp32/make: add detailed return error code for wifi APIs

1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API

See merge request !187
2016-11-08 19:48:11 +08:00
Liu Zhi Fu 8dee0a3f6d esp32: modify the code according to review comments
1. Adjust error code definition
2. Refractor the comments for esp_wifi_internal_tx
2016-11-08 19:25:03 +08:00
Ivan Grokhotkov c3eee0fa52 Merge branch 'revert-faad2923' into 'master'
Revert feature/ci_checkout_same_branch_for_submodule

This reverts merge request !178

See merge request !184
2016-11-08 18:48:11 +08:00
Ivan Grokhotkov 414e5ce1d5 Merge branch 'bugfix/rmt_mem_struct' into 'master'
Only fix rmt_mem_t struct definition error.

Modify the struct definition according to technical_reference_manual. 
Tested.

```
typedef volatile struct {
    struct {
        union {
            struct {
                uint32_t duration0:    15;
                uint32_t level0:       1;
                uint32_t duration1:    15;
                uint32_t level1:       1;
            };
            uint32_t val;
        } data[64];
    } chan[8];
} rmt_mem_t;
```

See merge request !186
2016-11-08 18:47:53 +08:00
Liu Zhi Fu cb5f7690a4 esp32/make: add detailed return error code for wifi APIs
1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API
2016-11-08 18:12:14 +08:00
Wu Jian Gang 0aca2506fc Merge branch 'feature/tw8387_merge_bt_wifi_coexist_code' into 'master'
esp32: merge bt/wifi coexist code

1. Modify makefile to add coexist lib
2. Update bt/wifi coexist lib

See merge request !185
2016-11-08 17:18:57 +08:00
Liu Zhi Fu 7340a77689 esp32: remove libcrypto according to review comments 2016-11-08 15:28:20 +08:00
Wangjialin 1418f886eb Only fix rmt_mem_t struct definition error. 2016-11-08 14:19:31 +08:00
Liu Zhi Fu 178db4bdd9 esp32: merge bt/wifi coexist code
1. Modify makefile to add coexist lib
2. Update bt/wifi coexist lib
2016-11-08 13:30:35 +08:00
Ivan Grokhotkov d12078b692 Revert "Merge branch 'feature/ci_checkout_same_branch_for_submodule' into 'master'"
This reverts merge request !178
2016-11-08 11:55:48 +08:00
Ivan Grokhotkov 0762b050dd Merge branch 'feature/integrate_unit_test_to_ci' into 'master'
integrate unit test to CI



See merge request !167
2016-11-07 21:17:08 +08:00
Ivan Grokhotkov 314cbcdb67 Merge branch 'feature/wpa_supplicant_libcrypto_source' into 'master'
wpa_supplicant: replace pre-built crypto library with source code

This change replaces libcrypto.a pre-built library with source code from wpa_supplicant.
For now i've decided to keep the modified layout of source and header files which is used in the esp32_rtos_sdk_core project. This will make it easier to move other parts of wpa_supplicant from esp32_rtos_sdk_core into esp-idf. Once we move everything, we can rearrange the files and upgrade wpa_supplicant to latest version.

See merge request !177
2016-11-07 21:15:49 +08:00
Wangjialin e452278194 Minor changes for driver
1. remove "\n" when calling ESP_LOGX APIs.
2. modify uart_event_t for uart rx data.
3. use MICRO for uart inverse value
4. add uart_tx_data_t for internal tx function.
2016-11-07 14:16:52 +08:00
Ivan Grokhotkov c8a43508e5 Merge branch 'bugfix/osx_menuconfig_build' into 'master'
Allow OS X to build without libintl

https://github.com/espressif/esp-idf/pull/42

I have tested this with the following configurations:
- OS X with Xcode command line tools, no macports, no homebrew
- OS X with Xcode command line tools and homebrew
- OS X with Xcode IDE and macports

All three work with this change, without it the first two had issues.

See merge request !172
2016-11-07 12:55:47 +08:00
Ivan Grokhotkov b6dd8a55cd Fix build with macports/pkgconfig, silence format string warnings on OS X
Extra space is needed in echo -n "-lncurses ", otherwise if pkg-config outputs a directory after that, it will result in "-lncurses-L/opt/local/lib" (without space).
-Wno-format-security flag is needed on macOS to silence warnings about printf(gettext("message")) constructs.
2016-11-07 12:27:53 +08:00
Ivan Grokhotkov 4e1c56e965 Merge branch 'feature/style_guide' into 'master'
docs: add style guide

This adds initial code style guide. Only section on code formatting is written, other sections to be added later.
Also adds scripts to format code using astyle.

See merge request !46
2016-11-07 12:26:15 +08:00
Ivan Grokhotkov 599a65657d Merge branch 'bugfix/bootloader_iram_overlap' into 'master'
fix overlap between bootloader and application IRAM ranges

This change moves the action of enabling APP CPU cache into the application startup code.
Therefore we don't need to use IRAM for the final stage of bootloader, and application can use all 0x20000 of IRAM.
This fixes crashes which happened when application used enough of IRAM to overlap with bootloader functions.

See merge request !176
2016-11-07 12:12:31 +08:00
Ivan Grokhotkov faad29234a Merge branch 'feature/ci_checkout_same_branch_for_submodule' into 'master'
Feature/ci checkout same branch for submodule

esp-idf have several submodules like wifi-lib, bt-lib. 

esp-idf branches may need to use specific branches in submodules to get build pass and do test.

This feature will first try to checkout the branch with same name for all submodules for jobs which uses global `before_script`

See merge request !178
2016-11-07 12:12:13 +08:00
Yinling 522f83ae3d remove unnecessary "git fetch" and add echo submodule path 2016-11-06 22:58:31 +08:00
Yinling 3051c74488 No need to deinit submodules as use clean clone by config 2016-11-06 22:53:23 +08:00
Yinling d093dcbbb7 try to checkout same branch for submodule in CI jobs 2016-11-06 22:43:12 +08:00
Krzysztof c3f7d15246 Instructions to prepare documentation 2016-11-05 17:19:31 +01:00
Krzysztof 3eaf1ec907 All API Reference docs updated to match header files
1. Wi-Fi <api/esp_wifi>
2. Bluetooth <api/bt>
2. GPIO <api/gpio>
4. LED
Control <api/ledc>
5. Logging <api/log>
6. Non-Volatile Storage
<api/nvs_flash>
7. Virtual Filesystem <api/vfs>
2016-11-05 17:18:25 +01:00
Krzysztof 7bcd68fb30 deep-sleep-stub added + TOC outline
TOC outline to show overal planned structure
2016-11-05 17:13:44 +01:00
Krzysztof adca98348e Resolved issue with version / release on Read the Docs
Read the Docs is building documentation referencing to specific releases
on GitHub.
Changing version / release  in this script is breaking menu in bottom
left corner
Now version / release should change only for local builds and not for
builds on Read the Docs
2016-11-05 17:11:40 +01:00
Krzysztof 9c2ab4559d Fixed section header style
Please follow https://docs.python.org/devguide/documenting.html#sections
2016-11-05 17:06:55 +01:00
Krzysztof b981b195be Fixed broken links 2016-11-05 17:04:35 +01:00
Ivan Grokhotkov 8089afd453 build fix 2016-11-04 15:52:45 +08:00