Commit graph

1048 commits

Author SHA1 Message Date
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
Ivan Grokhotkov 2d88fc0329 wpa_supplicant: replace pre-built crypto library with source code 2016-11-04 14:58:47 +08:00
Wangjialin 3ec23f1b83 Modify as Angus's suggestion:
1. Set XXX_TAG static, remove extern XXX_TAG in uart.h/ledc.h/gpio.h
2. I removed uart_set/get_print_port() functions, these functions are not well tested, I removed them for now.
3. Modify some function names for uart_read/write_bytes
4. Modify uart_write_bytes and uart_write_bytes_with_break.
2016-11-04 12:52:34 +08:00
Ivan Grokhotkov 2fa00ebd90 ld scripts: fix overlap between bootloader and application IRAM ranges 2016-11-04 12:18:57 +08:00
Ivan Grokhotkov 8bdcf0c5f7 newlib: fix compilation error when no timers are enabled in menuconfig 2016-11-04 10:55:25 +08:00
Wangjialin 15474b9b7e Merge branch 'master' into driver_merge_tmp/merge_uart 2016-11-04 02:56:41 +08:00
Wangjialin a6b3be6734 Update UART driver
1. fix bug in ringbuffer.c:
    When return an dummy item, free_ptr might exceed rd_ptr, so the write_ptr would overwrite rd_ptr in this case.
2. Delete UART tx task in buffer mode. UART ISR will copy the data from tx buffer to fifo.
2016-11-04 02:48:25 +08:00
Wangjialin 9ed7c4f8bc fix ringbuffer bug. 2016-11-03 23:30:54 +08:00
Sandeep Mistry e96d4a0a32 Allow OS X to build without libintl 2016-11-03 21:40:52 +08:00
Ivan Grokhotkov e314f42b0c 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.
2016-11-03 20:18:30 +08:00
Ivan Grokhotkov 4d3ed9efde docs: update style guide 2016-11-03 19:07:41 +08:00
Ivan Grokhotkov b717e44eb2 tools: add code formatter rules for Eclipse
Generated with Eclipse Neon, should work in earlier versions as well.

This file can be imported
- into the workspace via Preferences > C++ > Code Style > Formatter > Import
- or into the project via Project Preferences > C++ General > Formatter > Import

Configuration options in Eclipse are not exactly the same as in astyle.
There may be some discrepancy between the format astyle and Eclipse will produce.
If anyone notices that, please let me know.
2016-11-03 18:41:00 +08:00
Ivan Grokhotkov 6602d6b7f2 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.
2016-11-03 18:41:00 +08:00
Wangjialin 8282c73ac2 debug ring buffer error. 2016-11-03 18:28:36 +08:00
Ivan Grokhotkov abecab7525 Merge branch 'feature/time_syscalls' into 'master'
implement time syscalls

This change adds optional support for libc time functions.
New menuconfig option allows selecting FRC1,  RTC, both, or none to be used for timekeeping.

- If only FRC1 timer is used, gettimeofday will provide time at
		  microsecond resolution. Time will not be preserved when going
		  into deep sleep mode.
- If both FRC1 and RTC timers are used, timekeeping will
		  continue in deep sleep. Time will be reported at 1 microsecond
		  resolution.
- If only RTC timer is used, timekeeping will continue in
		  deep sleep, but time will be measured at 6.(6) microsecond
		  resolution. Also the gettimeofday function itself may take 
		  longer to run.
- If no timers are used, gettimeofday function will return -1 and
		  set errno to ENOSYS. 

`times` function returns time derived from FreeRTOS ticks. It reports all as 'system' time, 'user' time is reported as zero.

`settimeofday` function may be used to set current time.

LwIP SNTP module is hooked up into the system through `settimeofday`/`gettimeofday`.

Example demonstrating this functionality is also added.

ref. TW6415

See merge request !168
2016-11-03 18:02:58 +08:00
Ivan Grokhotkov bc4f1c90a7 conver tabs to spaces in frc_timer_reg.h 2016-11-03 17:44:23 +08:00
Ivan Grokhotkov 299655e3be esp32: add choice for RTC clock source
For now only one option is supported: internal RC oscillator
2016-11-03 17:37:15 +08:00
Ivan Grokhotkov 5035f51c4e Merge branch 'feature/openssl' into 'master'
Feature/openssl

The first openssl interface version based on mbedtls and some of these interface just have the function , not effectively.

See merge request !100
2016-11-03 15:37:28 +08:00
Ivan Grokhotkov eb2c633cbf newlib: implement settimeofday, integrate LwIP SNTP, add SNTP example 2016-11-03 12:46:46 +08:00
He Yin Ling 47910466ce Set result "Succeed" for passed cases 2016-11-02 20:54:22 +08:00
He Yin Ling e56b745527 incorrect "/", should be "\" 2016-11-02 20:21:46 +08:00
He Yin Ling c12aeb1127 add case select by name mark " before case name 2016-11-02 20:12:43 +08:00
Yinling 2e319705ec forget to break when test succeed 2016-11-02 19:41:33 +08:00
Yinling fdff6b2b01 run unit test case by case name 2016-11-02 19:08:55 +08:00
Ivan Grokhotkov c534dedf2d newlib: implement time syscalls 2016-11-02 17:31:35 +08:00
Dong Heng 0aadc58b87 Merge branch 'master' into feature/openssl 2016-11-02 15:46:52 +08:00
Angus Gratton aceb6517c0 Refactor existing bootloader common functionality into bootloader_support component 2016-11-02 17:58:41 +11:00
Jeroen Domburg 3af7872839 Merge branch 'bugfix/small_fixes' into 'master'
OpenOCD doc fix, fix gdbstub

- Fixes a few typos in the OpenOCD docs
- Fix compiling with gdbstub as panic handler

See merge request !165
2016-11-02 10:27:26 +08:00
Jeroen Domburg d0fac3c395 Language tweaking 2016-11-02 10:26:02 +08:00
Angus Gratton 04beb8baba Add documentation for bootloader secure boot stage 2016-11-02 10:41:59 +11:00
Angus Gratton 4ba1b73eba build system: Add espefuse/espsecure support for secure boot 2016-11-02 10:41:59 +11:00
Angus Gratton cf732bb663 esp32: efuse_reg add bit values for read & write disable flags 2016-11-02 10:41:59 +11:00
Angus Gratton f10cc7dc8e bootloader: Refactor secure boot digest generation 2016-11-02 10:41:59 +11:00
Ivan Grokhotkov 1cab448c73 Merge branch 'driver_merge_tmp/modify_gpio_ledc_h' into 'master'
Fix header docs for GPIO and LEDC drivers

Modify gpio.h and ledc.h according to documenting-code.rst

See merge request !166
2016-11-01 22:46:29 +08:00
Wangjialin e1f0c98ef5 Modify gpio.h and ledc.h 2016-11-01 22:35:42 +08:00
Ivan Grokhotkov 0df0d74d5d Merge branch 'bugfix/only_deploy_when_test_pass' into 'master'
fix bug that deploy when test failed:

test report will be a single stage. The result of test report will be calculated from the result of all test jobs in test stage. So it will only deploy when all test job passed.

See merge request !140
2016-11-01 22:27:37 +08:00
Ivan Grokhotkov f18c1f13b1 Merge branch 'feature/deepsleep_stub_linker' into 'master'
Deep sleep: Any source named rtc_wake_stub* is linked as RTC wake stub code

Also move esp_deepsleep.h documentation out to docs/deep-sleep-stub.rst

See merge request !142
2016-11-01 22:27:13 +08:00
Ivan Grokhotkov b8e940d645 Merge branch 'bugfix/nvs_write_failure' into 'master'
Fix spi_flash_write regression and nvs error recovery

In the previous set of changes related to spi_flash, new alignment checks were added. One of these checks, word alignment of `src` buffer in `nvs_flas_write`, was unnecessary.  ROM `SPIWrite` function can handle unaligned source buffers.

This change caused an error to be returned to nvs for some legitimate write operations. Due to a bug in nvs, further write operations were possible, while the internal state of `Page` instance was broken. In WiFi functional tests, this inflicted havoc on the nvs partition, creating multiple duplicate items in the affected page. Because multiple duplicate items per page were never supposed to be handled during page load, duplicates were not removed. Thankfully this caused an assert at a later point in the loading process, otherwise this bug would be very difficult to detect.

This change set fixes the original spi_flash regression, handling of `INVALID` state of `nvs::Page`, and handling of duplicate items.

See merge request !161
2016-11-01 22:26:37 +08:00
Ivan Grokhotkov fe64ea95b4 Merge branch 'feature/tw8155_optimize_tx_flow_control' into 'master'
Feature/tw8155 optimize tx flow control

1. Remove TX flow control in LWIP
2. Make the return value of esp_wifi_internal_tx consistent with LWIP error code

See merge request !164
2016-11-01 22:26:15 +08:00
Ivan Grokhotkov d76868eec1 Merge branch 'feature/api_doc' into 'master'
API reference, first batch

This includes fixes to documentation formats in header files, some standalone doc fixes, necessary files for readthedocs, and instructions for documenting the code.

See merge request !162
2016-11-01 22:25:20 +08:00
Ivan Grokhotkov 4f71d741ec docs: deploy built docs 2016-11-01 22:21:46 +08:00
Yinling c67ac340c7 use correct template for unit test jobs 2016-11-01 20:33:23 +08:00
Ivan Grokhotkov 1d3626c119 docs: fix typos, build docs with gitlab CI 2016-11-01 20:08:29 +08:00
Yinling 5784586041 integrate unit test to CI 2016-11-01 19:30:42 +08:00