Commit graph

34 commits

Author SHA1 Message Date
morris 29f8aecfc0 console_repl: change config structure to support different devices 2020-07-02 07:39:46 +00:00
Fu Hanxi 5b2fa1a5ad build_app: make multi target support readable 2020-04-09 16:40:57 +08:00
Felipe Ruhland 718a34f765 Fix typo from ic2_tools readme
Merges https://github.com/espressif/esp-idf/pull/4488
2020-03-07 12:11:37 +08:00
suda-morris 75cadc2e41 console: simplify examples
1. simplify console examples
2. add "quit" command
3. support console command overwrite
4. add API reference
2020-02-07 20:15:06 +08:00
He Yin Ling c906e2afee test: update example and unit tests with new import roles:
tiny_test_fw is a python package now. import it using normal way.
2019-12-07 10:34:54 +08:00
houwenxiang aac935ec81 bugfix(i2c): fix I2C driver breaking change issue.
1. Fixed I2C driver breaking change issue.
    2. Add I2C UT test case.
2019-12-04 15:51:36 +08:00
houwenxiang f27ae9b0e2 feature: Add uart hal support. 2019-11-26 20:01:50 +08:00
houwenxiang 28286183d1 feature(I2C): Add i2c hal support. 2019-11-21 20:34:07 +08:00
Angus Gratton 496ede9bcd Merge branch 'master' into feature/esp32s2beta_merge 2019-10-15 14:59:27 +11:00
suda-morris 81e88764d5 console: fix wrong param passed to esp_err_to_name 2019-10-14 19:49:19 +08:00
Michael (XIAO Xufeng) 63329b169b ci: limit example test to ESP32s 2019-09-04 10:53:25 +10:00
Angus Gratton 04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton 24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00
Anton Maklakov afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
Ivan Grokhotkov 26800ed71e global: update note in the partition tables
The build system automatically determines offsets of partitions from
the partition table, so no manual changes are needed. Instead, add a
note that partition offsets may need to be updated when increasing
the bootloader size.
2019-07-27 10:28:16 +02:00
chenjianqiang 667113cf94 feat(i2c): update i2c driver for esp32s2beta 2019-07-10 11:41:36 +08:00
Angus Gratton 47bbb107a8 build system: Use CMake-based build system as default when describing commands 2019-07-08 17:31:27 +10:00
Michael (XIAO Xufeng) 25ab8380c8 ci: support to build esp32s2beta simple examples 2019-07-08 09:16:06 +08:00
Renz Christian Bagaporo 6771eead80 examples: use new component registration api 2019-06-21 19:53:29 +08:00
Roland Dobai 151f757912 Rename Kconfig options (examples) 2019-05-21 09:32:55 +02:00
Roland Dobai 1ad2283641 Rename Kconfig options (components/bootloader) 2019-05-21 09:32:55 +02:00
Roland Dobai 0ae53691ba Rename Kconfig options (components/esp32) 2019-05-21 09:09:01 +02:00
Ivan Grokhotkov 945bd36884 examples: don't enable buffering on stdout in console examples
newlib uses significantly more stack space when printing to an
unbuffered stream. To reduce the amount of stack space required to
use the console, don’t disable buffering. linenoise should support
unbuffered stdout instead.
2019-03-13 20:32:37 +08:00
Roland Dobai 37126d3451 Correct Kconfigs according to the coding style 2019-01-29 13:37:01 +01:00
morris 9163e454f1 example_test: using try block to pass the python style check 2018-11-30 10:13:58 +08:00
morris 2b165f99c4 i2c_tool: add i2c_tool example test
1. add example test for i2c-tools
2. make command line arguments number configurable
2018-11-30 10:08:28 +08:00
morris 6d1e23796f i2c/i2c-tools: add i2c-tools example
1. add command i2cconfig
2. add command i2cdetect
3. add command i2cget
4. add command i2cset
5. add command i2cdump
6. add README.md
2018-10-16 16:13:21 +08:00
morris 89d7f7bc89 doc/i2c-example: cleanup readme of i2c example
1. Update i2c README to add more detail according to the template.[TW#26530]
2. Move some specific configuration to KConfig
2018-10-12 10:24:39 +08:00
Renz Christian Bagaporo d9939cedd9 cmake: make main a component again 2018-09-11 09:44:12 +08:00
Angus Gratton 800bffb8b0 cmake: Add CMakeLists.txt files for all examples
Generating using convert_to_cmake.py, with some minor cleanup
2018-04-30 09:59:20 +10:00
Roland Dobai 27a63c492f Examples: Demonstrate the usage of esp_err_to_name 2018-03-13 14:27:00 +01:00
Wangjialin ed1e32f583 bugfix(i2c): add I2C hardware reset if the hw FSM get stuck
Reported from different sources from github or bbs:

https://github.com/espressif/esp-idf/issues/680

https://github.com/espressif/esp-idf/issues/922

We tested reading several sensor or other I2C slave devices, if the power and SDA/SCL wires are in proper condition, everything works find with reading the slave.
If we remove the power supply for the slave during I2C is reading, or directly connect SDA or SCL to ground, this would  cause the I2C FSM get stuck in wrong state, all we can do is the reset the I2C hardware in this case.
After this commit, no matter whether the power supply of I2C slave is removed or SDA / SCL are shorted to ground, the driver can recover from wrong state.

We are not sure whether this the save issue with the reported one yet, but to make the driver more robust.

Further information:

1. For I2C master mode, we have tested different situations, e.g., to short the SDA/SCL directly to GND/VCC, to short the SDA to SCL, to un-plug the slave device, to power off the slave device. Under all of those situations, this version of driver can recover and keep working.
2. Some slave device will die by accident and keep the SDA in low level, in this case, master should send several clock to make the slave release the bus.
3. Slave mode of ESP32 might also get in wrong state that held the SDA low, in this case, master device could send a stop signal to make esp32 slave release the bus.

Modifications:

1. Disable I2C_MASTER_TRAN_COMP interrupt to void extra interrupt.
2. Disable un-used timeout interrupt for slave.
3. Add bus reset if error detected for master mode.
4. Add bus clear if SDA level is low when error detected.
5. Modify the argument type of i2c_set_pin.
6. add API to set timeout value
7. add parameter check for timing APIs
2017-10-21 02:10:59 +08:00
Angus Gratton 821c70f5d7 examples: Standardise naming of files, symbols, etc. in examples
* Use "example" in all example function & variable names,
  ie use i2c_example_xxx instead of i2c_xxx for example functions.
  Closes #198 https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation
2017-03-27 17:42:05 +11:00
Krzysztof Budzynski 382999b378 Moved examples to new folders / categories. Removed example numbers from example names 2017-01-16 23:08:35 +01:00