Commit graph

49 commits

Author SHA1 Message Date
morris
4fc16e2374 rmt: prefix caps name with SOC_ 2020-03-25 17:14:00 +08:00
morris
0c17af3ea4 rmt: support tx loop count 2020-03-25 17:14:00 +08:00
morris
dc91aa9786 rmt: support tx in a group 2020-03-25 17:13:59 +08:00
morris
fa167eb0c5 rmt: test tx/rx ping-pong mode 2020-03-25 17:13:47 +08:00
morris
855b316045 rmt: better support rx demodulation 2020-03-25 13:19:03 +08:00
morris
c91565d538 rmt: update rmt ll APIs 2020-03-25 13:19:03 +08:00
chenjianqiang
ecbe0dad1b driver/rmt: new features on esp32s2
1. add receive carrier remove function
2. add pingpong receive function
2020-03-25 13:19:03 +08:00
morris
07088c6446 rmt: disable carrier feature by default 2020-03-03 20:14:46 +08:00
morris
0e4d82bc55 rmt: support REF_TICK as channel clock source
Closes https://github.com/espressif/esp-idf/pull/3952
2020-03-03 20:14:46 +08:00
houwenxiang
4c065c217e driver(rmt): Fix the rmt err interrupt crash bug when sending 63 items 2020-01-13 08:30:20 +00:00
morris
8fd8695ea1 rmt: add HAL layer 2019-11-20 10:54:21 +08:00
Angus Gratton
438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-16 16:18:48 +10:00
Konstantin Kondrashov
9a669bfbb9 rmt/driver: Add module reset before enabling 2019-08-09 17:09:56 +08:00
Angus Gratton
04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
houwenxiang
6a8fe5cf79 Update RMT driver for esp32s2beta 2019-07-11 19:15:05 +08:00
suda-morris
84b2f9f14d build and link hello-world for esp32s2beta 2019-06-11 13:07:37 +08:00
Konstantin Kondrashov
399d2d2605 all: Using xxx_periph.h
Using xxx_periph.h in whole IDF instead of xxx_reg.h, xxx_struct.h, xxx_channel.h ... .

Cleaned up header files from unnecessary headers (releated to soc/... headers).
2019-06-03 14:15:08 +08:00
Sachin Parekh
da41885e85 rmt: port*_CRITICAL vanilla FreeRTOS compliance
Signed-off-by: Sachin Parekh <sachin.parekh@espressif.com>
2019-05-13 16:39:19 +05:30
Michael (XIAO Xufeng)
562af8f65e global: move the soc component out of the common list
This MR removes the common dependency from every IDF components to the SOC component.

Currently, in the ``idf_functions.cmake`` script, we include the header path of SOC component by default for all components.
But for better code organization (or maybe also benifits to the compiling speed), we may remove the dependency to SOC components for most components except the driver and kernel related components.

In CMAKE, we have two kinds of header visibilities (set by include path visibility):

(Assume component A --(depends on)--> B, B is the current component)

1. public (``COMPONENT_ADD_INCLUDEDIRS``): means this path is visible to other depending components (A) (visible to A and B)
2. private (``COMPONENT_PRIV_INCLUDEDIRS``): means this path is only visible to source files inside the component (visible to B only)

and we have two kinds of depending ways:

(Assume component A --(depends on)--> B --(depends on)--> C, B is the current component)

1. public (```COMPONENT_REQUIRES```): means B can access to public include path of C. All other components rely on you (A) will also be available for the public headers. (visible to A, B)
2. private (``COMPONENT_PRIV_REQUIRES``): means B can access to public include path of C, but don't propagate this relation to other components (A). (visible to B)

1. remove the common requirement in ``idf_functions.cmake``, this makes the SOC components invisible to all other components by default.
2. if a component (for example, DRIVER) really needs the dependency to SOC, add a private dependency to SOC for it.
3. some other components that don't really depends on the SOC may still meet some errors saying "can't find header soc/...", this is because it's depended component (DRIVER) incorrectly include the header of SOC in its public headers. Moving all this kind of #include into source files, or private headers
4. Fix the include requirements for some file which miss sufficient #include directives. (Previously they include some headers by the long long long header include link)

This is a breaking change. Previous code may depends on the long include chain.
You may need to include the following headers for some files after this commit:

- soc/soc.h
- soc/soc_memory_layout.h
- driver/gpio.h
- esp_sleep.h

The major broken include chain includes:

1. esp_system.h no longer includes esp_sleep.h. The latter includes driver/gpio.h and driver/touch_pad.h.
2. ets_sys.h no longer includes soc/soc.h
3. freertos/portmacro.h no longer includes soc/soc_memory_layout.h

some peripheral headers no longer includes their hw related headers, e.g. rom/gpio.h no longer includes soc/gpio_pins.h and soc/gpio_reg.h

BREAKING CHANGE
2019-04-16 13:21:15 +08:00
morris
f5b03c9ea3 misc adjustment of esp32 component 2019-04-03 19:57:46 +08:00
Konstantin Kondrashov
b1b5849c4c rmt/driver: Sped the rmt_driver_isr_default ISR
Used __builtin_ctz function to sped ISR.
2019-03-13 13:50:43 +00:00
Paul Abbott
be567d3eb5 driver(rmt): Fixed some RMT related issues.
1. Add missing get function to RMT API: rmt_get_idle_level().
2. Suppress error message from rmt_wait_tx_done() if wait_time==0 (allows for polling).
3. Remove the blank lines between parameter lists.

Merges https://github.com/espressif/esp-idf/pull/2666
2018-12-18 13:32:39 +08:00
kooho
da223fad4e driver(rmt): Add API get rmt channel's status.
closes https://github.com/espressif/esp-idf/issues/1175
closes https://github.com/espressif/esp-idf/issues/2599
closes https://github.com/espressif/esp-idf/issues/2452
2018-11-28 07:20:45 +00:00
XiongYu
6d57757840 Modify the rmt_mem_num maximum limit value from 15 to 8. 2018-07-16 19:10:42 +08:00
kooho
5bc8ae3b3a driver(rmt):Add API supports sending uint8_t type data. 2018-05-22 01:55:44 +00:00
kooho
f6f9f93a9d driver(i2c, rmt):Add intr_flag setting to ESP_INTR_FLAG_IRAM support when enable psram. 2018-05-21 09:37:56 +08:00
kooho
a8d26d7e4d driver(rmt):Fix rmt_tx_stop bug. 2018-05-14 19:46:30 +08: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
Angus Gratton
2227c44254 rmt: Add void * argument for end-of-transmission callback
Ref https://github.com/espressif/esp-idf/pull/1174
2018-01-05 17:31:59 +11:00
Krzysztof Bociurko
1066c74b74 rmt: Adds a simple handler that can be called when transmission ends.
Merges https://github.com/espressif/esp-idf/pull/1174
2018-01-05 17:14:02 +11:00
Per Malmberg
f7f52414ec Removed logging in RMT driver which skews the timing. Issue #1345
Merges https://github.com/espressif/esp-idf/pull/1450
2018-01-03 10:50:03 +11:00
Wangjialin
ab1abff080 bugfix(rmt): fix event thresh check issue
reported from: https://github.com/espressif/esp-idf/issues/1011

1. Fix event thresh check issue
2. Change IO number in example in case it conflicts with GPIO16(psram cs pin).
2017-10-18 18:49:09 +08:00
Nilay Sheth
0eb59844bb bugfix(driver): fix RMT issues from github
1. Rename api from rmt_get_ringbuf_handler to rmt_get_ringbuf_handle (Github Issue #274)
2. doxygen param rename
3. change API rmt_wait_tx_done to specify maximum waiting time
4.Change return type of rmt_wait_tx_done API from bool to esp_err_t
5. update doc
2017-08-15 17:23:51 +08:00
Angus Gratton
c77b699463 rmt driver: Manage driver interrupt handler based on which channels are enabled
Previously the first call to rmt_driver_uninstall() would remove the interrupt handler,
even if other channels still had the driver installed.

Adds an OS-level lock to control concurrent registration/deregistration of channels.
2017-06-09 16:11:21 +10:00
Angus Gratton
4b58cc12cd rmt driver: When deleting, disable interrupt before freeing data structures
Fixes potential race if RMT interrupt happens while deregistering (unlikely
due to timing of taking semaphore tx_sem, but still possible.)
2017-06-08 16:14:51 +10:00
devsaurus
ae94fe04ef components/driver/rmt: Add const qualifier for config and tx data. 2017-04-11 18:55:56 +08:00
devsaurus
cc164b0dc3 fix rmt_set_tx_thr_intr_en(): check evt_thresh only in enable path 2017-04-11 18:55:56 +08:00
Angus Gratton
64f26be053 rmt driver: Remove accidental ESP_LOGE in isr handler
Closes #451 https://github.com/espressif/esp-idf/issues/451
2017-03-22 14:33:22 +08:00
Angus Gratton
c30bba8c63 rmt driver: Fix parameter & description of rmt_driver_install
Closes #187 https://github.com/espressif/esp-idf/issues/187
2017-03-22 12:30:34 +08:00
Angus Gratton
9496fda662 RMT driver: Rename rmt_set_evt_intr_en to rmt_set_tx_thr_intr_en
Closes github #115: https://github.com/espressif/esp-idf/issues/115
2016-12-28 10:17:56 +11:00
Angus Gratton
41eca2c67b RMT: Don't require carrier_freq_hz to be non-zero if carrier_en unset
Closes github #123 https://github.com/espressif/esp-idf/issues/123
2016-12-28 10:17:56 +11:00
Ivan Grokhotkov
1c60a0450e Merge branch 'bugfix/driver_cleanup_log' into 'master'
drivers: remove file paths from log statements

Function name and error string are usually sufficient to find the place which has triggered an error. 

`__FILE__` macro generates a string which has absolute file name (with our build system), which add many long strings to the program binary.

Also change log tags to lower case to match style used elsewhere.

Fixes https://github.com/espressif/esp-idf/issues/126

See merge request !282
2016-12-12 10:15:25 +08:00
Jeroen Domburg
ae8c37e0b6 Add disabling/enabling of shared interrupt, add testcase for interrupts 2016-12-08 12:39:33 +08:00
Jeroen Domburg
655fd2986a Add interrupt allocation scheme / interrupt sharing. Also modifies drivers and examples. Also allows interrupts
to be marked specifically as having a handler that's all in IRAM.
2016-12-08 12:39:33 +08:00
Neil Kolban
dbc5edac7e Removal of spurious newline character in debug statement
There was a debug statement in the code that included an additional newline character that wasn't needed.
2016-12-07 13:57:09 -08:00
Ivan Grokhotkov
0dff9ed79d drivers: remove file paths from log statements
Function name and error string are usually sufficient to find the place which has triggered an error. __FILE__ macro generates a string which has absolute file name (with our build system), so there is a lot of long strings present in the program because of that.

Fixes https://github.com/espressif/esp-idf/issues/126
2016-12-07 12:01:54 +08:00
Angus Gratton
79646f41b5 Fixes for stdlib.h inclusion
Refs:
http://esp32.com/viewtopic.php?f=13&t=550
http://esp32.com/viewtopic.php?f=13&t=551

rmt.c should include stdlib.h for malloc, esp_bignum,c &
https_request_main.c for abort().

FreeRTOSConfig.h is only including stdlib if
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is
included for abort() so needs to be included whenever
CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set.

This change includes unconditionally in FreeRTOSConfig.h. This is to
avoid this kind of bug where compiler errors are dependent on config. I
suggest we don't change this to be more selective until we have 'make
randomconfig' style tests in CI.
2016-11-24 08:20:21 +11:00
Wangjialin
6a1dbc3f1c add RMT driver and example 2016-11-22 00:57:19 +08:00