forked from espressif/esp-idf
feat(rmt): introduce RMT_ENCODER_FUNC_ATTR for encoder functions
Closes https://github.com/espressif/esp-idf/issues/15832
This commit is contained in:
@@ -589,6 +589,8 @@ There is a Kconfig option :ref:`CONFIG_RMT_TX_ISR_CACHE_SAFE` and :ref:`CONFIG_R
|
||||
|
||||
This Kconfig option allows the interrupt handler to run while the cache is disabled but comes at the cost of increased IRAM consumption.
|
||||
|
||||
Please note, when :ref:`CONFIG_RMT_TX_ISR_CACHE_SAFE` is enabled, you must also place the encoder functions (mainly the :cpp:member:`rmt_encoder_t::encode` and :cpp:member:`rmt_encoder_t::reset`) into IRAM. You can use :c:macro:`RMT_ENCODER_FUNC_ATTR` to decorate your encoder functions.
|
||||
|
||||
Another Kconfig option :ref:`CONFIG_RMT_RECV_FUNC_IN_IRAM` can place :cpp:func:`rmt_receive` into the IRAM as well. So that the receive function can be used even when the flash cache is disabled.
|
||||
|
||||
.. _rmt-thread-safety:
|
||||
|
@@ -589,6 +589,8 @@ Cache 安全
|
||||
|
||||
启用该选项可以保证 cache 禁用时的中断运行,但会相应增加 IRAM 占用。
|
||||
|
||||
请注意,当 :ref:`CONFIG_RMT_TX_ISR_CACHE_SAFE` 使能后,你必须将编码器函数 (主要是 :cpp:member:`rmt_encoder_t::encode` 和 :cpp:member:`rmt_encoder_t::reset`) 放进 IRAM 中。建议你使用 :c:macro:`RMT_ENCODER_FUNC_ATTR` 来装饰你的编码器函数。
|
||||
|
||||
另外一个 Kconfig 选项 :ref:`CONFIG_RMT_RECV_FUNC_IN_IRAM` 可以将 :cpp:func:`rmt_receive` 函数放进内部的 IRAM 中,从而当 flash cache 被关闭的时候,这个函数也能够被使用。
|
||||
|
||||
.. _rmt-thread-safety:
|
||||
|
Reference in New Issue
Block a user