Adding RMT support, compat with ESP32-S2-WROVER, version bump.
This commit is contained in:
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
VERSION=7.0.6.6
|
VERSION=7.0.6.7
|
||||||
STABLE_VERSION=7.0.5.4
|
STABLE_VERSION=7.0.5.4
|
||||||
REVISION=$(shell git rev-parse HEAD)
|
REVISION=$(shell git rev-parse HEAD)
|
||||||
REVSHORT=$(shell echo $(REVISION) | head -c 7)
|
REVSHORT=$(shell echo $(REVISION) | head -c 7)
|
||||||
|
|||||||
@ -151,6 +151,24 @@ ESP_INTR_FLAG_DEFAULT gpio_install_isr_service drop
|
|||||||
|
|
||||||
forth definitions
|
forth definitions
|
||||||
|
|
||||||
|
vocabulary rmt rmt definitions
|
||||||
|
transfer{
|
||||||
|
rmt_set_clk_div rmt_get_clk_div rmt_set_rx_idle_thresh rmt_get_rx_idle_thresh
|
||||||
|
rmt_set_mem_block_num rmt_get_mem_block_num rmt_set_tx_carrier
|
||||||
|
rmt_set_mem_pd rmt_get_mem_pd rmt_tx_start rmt_tx_stop rmt_rx_start rmt_rx_stop
|
||||||
|
rmt_tx_memory_reset rmt_rx_memory_reset rmt_set_memory_owner rmt_get_memory_owner
|
||||||
|
rmt_set_tx_loop_mode rmt_get_tx_loop_mode rmt_set_rx_filter
|
||||||
|
rmt_set_source_clk rmt_get_source_clk rmt_set_idle_level rmt_get_idle_level
|
||||||
|
rmt_get_status rmt_set_rx_intr_en rmt_set_err_intr_en rmt_set_tx_intr_en
|
||||||
|
rmt_set_tx_thr_intr_en
|
||||||
|
rmt_set_gpio rmt_config rmt_isr_register rmt_isr_deregister
|
||||||
|
rmt_fill_tx_items rmt_driver_install rmt_driver_uinstall
|
||||||
|
rmt_get_channel_status rmt_get_counter_clock rmt_write_items
|
||||||
|
rmt_wait_tx_done rmt_get_ringbuf_handle rmt_translator_init
|
||||||
|
rmt_translator_set_context rmt_translator_get_context rmt_write_sample
|
||||||
|
}transfer
|
||||||
|
forth definitions
|
||||||
|
|
||||||
vocabulary rtos rtos definitions
|
vocabulary rtos rtos definitions
|
||||||
transfer{
|
transfer{
|
||||||
xPortGetCoreID xTaskCreatePinnedToCore vTaskDelete
|
xPortGetCoreID xTaskCreatePinnedToCore vTaskDelete
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
#define ENABLE_SOCKETS_SUPPORT
|
#define ENABLE_SOCKETS_SUPPORT
|
||||||
#define ENABLE_FREERTOS_SUPPORT
|
#define ENABLE_FREERTOS_SUPPORT
|
||||||
#define ENABLE_INTERRUPTS_SUPPORT
|
#define ENABLE_INTERRUPTS_SUPPORT
|
||||||
|
#define ENABLE_RMT_SUPPORT
|
||||||
|
|
||||||
// SD_MMC does not work on ESP32-S2 / ESP32-C3
|
// SD_MMC does not work on ESP32-S2 / ESP32-C3
|
||||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||||
@ -50,13 +51,17 @@
|
|||||||
// Adafruit BusIO
|
// Adafruit BusIO
|
||||||
//#define ENABLE_OLED_SUPPORT
|
//#define ENABLE_OLED_SUPPORT
|
||||||
|
|
||||||
// For now assume only boards with PSRAM (ESP32-CAM)
|
// For now assume only boards with PSRAM should enable
|
||||||
// will want SerialBluetooth (very large) and camera support.
|
// camera support and BluetoothSerial.
|
||||||
// Other boards can support these if they're set to a larger
|
// ESP32-CAM always have PSRAM, but so do WROVER boards,
|
||||||
// parition size. But it's unclear the best way to configure this.
|
// so this isn't an ideal indicator.
|
||||||
|
// Some boards (e.g. ESP32-S2-WROVER) don't seem to have
|
||||||
|
// built the serial library, so check if its enabled as well.
|
||||||
#ifdef BOARD_HAS_PSRAM
|
#ifdef BOARD_HAS_PSRAM
|
||||||
# define ENABLE_CAMERA_SUPPORT
|
# define ENABLE_CAMERA_SUPPORT
|
||||||
# define ENABLE_SERIAL_BLUETOOTH_SUPPORT
|
# if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BLUEDROID_ENABLED)
|
||||||
|
# define ENABLE_SERIAL_BLUETOOTH_SUPPORT
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_WEBSERVER_SUPPORT
|
#ifdef ENABLE_WEBSERVER_SUPPORT
|
||||||
@ -166,6 +171,7 @@
|
|||||||
OPTIONAL_SOCKETS_SUPPORT \
|
OPTIONAL_SOCKETS_SUPPORT \
|
||||||
OPTIONAL_FREERTOS_SUPPORT \
|
OPTIONAL_FREERTOS_SUPPORT \
|
||||||
OPTIONAL_INTERRUPTS_SUPPORT \
|
OPTIONAL_INTERRUPTS_SUPPORT \
|
||||||
|
OPTIONAL_RMT_SUPPORT \
|
||||||
OPTIONAL_OLED_SUPPORT \
|
OPTIONAL_OLED_SUPPORT \
|
||||||
USER_WORDS
|
USER_WORDS
|
||||||
|
|
||||||
@ -198,7 +204,8 @@
|
|||||||
# include "freertos/task.h"
|
# include "freertos/task.h"
|
||||||
# define OPTIONAL_FREERTOS_SUPPORT \
|
# define OPTIONAL_FREERTOS_SUPPORT \
|
||||||
Y(vTaskDelete, vTaskDelete((TaskHandle_t) n0); DROP) \
|
Y(vTaskDelete, vTaskDelete((TaskHandle_t) n0); DROP) \
|
||||||
Y(xTaskCreatePinnedToCore, n0 = xTaskCreatePinnedToCore((TaskFunction_t) a6, c5, n4, a3, (UBaseType_t) n2, (TaskHandle_t *) a1, (BaseType_t) n0); NIPn(6)) \
|
Y(xTaskCreatePinnedToCore, n0 = xTaskCreatePinnedToCore((TaskFunction_t) a6, \
|
||||||
|
c5, n4, a3, (UBaseType_t) n2, (TaskHandle_t *) a1, (BaseType_t) n0); NIPn(6)) \
|
||||||
Y(xPortGetCoreID, PUSH xPortGetCoreID())
|
Y(xPortGetCoreID, PUSH xPortGetCoreID())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -239,6 +246,64 @@
|
|||||||
Y(timer_isr_register, n0 = TimerIsrRegister(n5, n4, n3, n2, n1, a0); NIPn(5))
|
Y(timer_isr_register, n0 = TimerIsrRegister(n5, n4, n3, n2, n1, a0); NIPn(5))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef ENABLE_RMT_SUPPORT
|
||||||
|
# define OPTIONAL_RMT_SUPPORT
|
||||||
|
#else
|
||||||
|
# include "driver/rmt.h"
|
||||||
|
# define OPTIONAL_RMT_SUPPORT \
|
||||||
|
Y(rmt_set_clk_div, n0 = rmt_set_clk_div((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_get_clk_div, n0 = rmt_get_clk_div((rmt_channel_t) n1, b0); NIP) \
|
||||||
|
Y(rmt_set_rx_idle_thresh, n0 = rmt_set_rx_idle_thresh((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_get_rx_idle_thresh, \
|
||||||
|
n0 = rmt_get_rx_idle_thresh((rmt_channel_t) n1, (uint16_t *) a0); NIP) \
|
||||||
|
Y(rmt_set_mem_block_num, n0 = rmt_set_mem_block_num((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_get_mem_block_num, n0 = rmt_get_mem_block_num((rmt_channel_t) n1, b0); NIP) \
|
||||||
|
Y(rmt_set_tx_carrier, n0 = rmt_set_tx_carrier((rmt_channel_t) n4, n3, n2, n1, \
|
||||||
|
(rmt_carrier_level_t) n0); NIPn(4)) \
|
||||||
|
Y(rmt_set_mem_pd, n0 = rmt_set_mem_pd((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_get_mem_pd, n0 = rmt_get_mem_pd((rmt_channel_t) n1, (bool *) a0); NIP) \
|
||||||
|
Y(rmt_tx_start, n0 = rmt_tx_start((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_tx_stop, n0 = rmt_tx_stop((rmt_channel_t) n0)) \
|
||||||
|
Y(rmt_rx_start, n0 = rmt_rx_start((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_rx_stop, n0 = rmt_rx_stop((rmt_channel_t) n0)) \
|
||||||
|
Y(rmt_tx_memory_reset, n0 = rmt_tx_memory_reset((rmt_channel_t) n0)) \
|
||||||
|
Y(rmt_rx_memory_reset, n0 = rmt_rx_memory_reset((rmt_channel_t) n0)) \
|
||||||
|
Y(rmt_set_memory_owner, n0 = rmt_set_memory_owner((rmt_channel_t) n1, (rmt_mem_owner_t) n0); NIP) \
|
||||||
|
Y(rmt_get_memory_owner, n0 = rmt_get_memory_owner((rmt_channel_t) n1, (rmt_mem_owner_t *) a0); NIP) \
|
||||||
|
Y(rmt_set_tx_loop_mode, n0 = rmt_set_tx_loop_mode((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_get_tx_loop_mode, n0 = rmt_get_tx_loop_mode((rmt_channel_t) n1, (bool *) a0); NIP) \
|
||||||
|
Y(rmt_set_rx_filter, n0 = rmt_set_rx_filter((rmt_channel_t) n2, n1, n0); NIPn(2)) \
|
||||||
|
Y(rmt_set_source_clk, n0 = rmt_set_source_clk((rmt_channel_t) n1, (rmt_source_clk_t) n0); NIP) \
|
||||||
|
Y(rmt_get_source_clk, n0 = rmt_get_source_clk((rmt_channel_t) n1, (rmt_source_clk_t * ) a0); NIP) \
|
||||||
|
Y(rmt_set_idle_level, n0 = rmt_set_idle_level((rmt_channel_t) n2, n1, \
|
||||||
|
(rmt_idle_level_t) n0); NIPn(2)) \
|
||||||
|
Y(rmt_get_idle_level, n0 = rmt_get_idle_level((rmt_channel_t) n2, \
|
||||||
|
(bool *) a1, (rmt_idle_level_t *) a0); NIPn(2)) \
|
||||||
|
Y(rmt_get_status, n0 = rmt_get_status((rmt_channel_t) n1, (uint32_t *) a0); NIP) \
|
||||||
|
Y(rmt_set_rx_intr_en, n0 = rmt_set_rx_intr_en((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_set_err_intr_en, n0 = rmt_set_err_intr_en((rmt_channel_t) n1, (rmt_mode_t) n0); NIP) \
|
||||||
|
Y(rmt_set_tx_intr_en, n0 = rmt_set_tx_intr_en((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_set_tx_thr_intr_en, n0 = rmt_set_tx_thr_intr_en((rmt_channel_t) n2, n1, n0); NIPn(2)) \
|
||||||
|
Y(rmt_set_gpio, n0 = rmt_set_gpio((rmt_channel_t) n3, (rmt_mode_t) n2, (gpio_num_t) n1, n0); NIPn(3)) \
|
||||||
|
Y(rmt_config, n0 = rmt_config((const rmt_config_t *) a0)) \
|
||||||
|
Y(rmt_isr_register, n0 = rmt_isr_register((void (*)(void*)) a3, a2, n1, \
|
||||||
|
(rmt_isr_handle_t *) a0); NIPn(3)) \
|
||||||
|
Y(rmt_isr_deregister, n0 = rmt_isr_deregister((rmt_isr_handle_t) n0)) \
|
||||||
|
Y(rmt_fill_tx_items, n0 = rmt_fill_tx_items((rmt_channel_t) n3, \
|
||||||
|
(rmt_item32_t *) a2, n1, n0); NIPn(3)) \
|
||||||
|
Y(rmt_driver_install, n0 = rmt_driver_install((rmt_channel_t) n2, n1, n0); NIPn(2)) \
|
||||||
|
Y(rmt_driver_uinstall, n0 = rmt_driver_uninstall((rmt_channel_t) n0)) \
|
||||||
|
Y(rmt_get_channel_status, n0 = rmt_get_channel_status((rmt_channel_status_result_t *) a0)) \
|
||||||
|
Y(rmt_get_counter_clock, n0 = rmt_get_counter_clock((rmt_channel_t) n1, (uint32_t *) a0); NIP) \
|
||||||
|
Y(rmt_write_items, n0 = rmt_write_items((rmt_channel_t) n3, (rmt_item32_t *) a2, n1, n0); NIPn(3)) \
|
||||||
|
Y(rmt_wait_tx_done, n0 = rmt_wait_tx_done((rmt_channel_t) n1, n0); NIP) \
|
||||||
|
Y(rmt_get_ringbuf_handle, n0 = rmt_get_ringbuf_handle((rmt_channel_t) n1, (RingbufHandle_t *) a0); NIP) \
|
||||||
|
Y(rmt_translator_init, n0 = rmt_translator_init((rmt_channel_t) n1, (sample_to_rmt_t) n0); NIP) \
|
||||||
|
Y(rmt_translator_set_context, n0 = rmt_translator_set_context((rmt_channel_t) n1, a0); NIP) \
|
||||||
|
Y(rmt_translator_get_context, n0 = rmt_translator_get_context((const size_t *) a1, (void **) a0); NIP) \
|
||||||
|
Y(rmt_write_sample, n0 = rmt_write_sample((rmt_channel_t) n3, b2, n1, n0); NIPn(3))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef ENABLE_CAMERA_SUPPORT
|
#ifndef ENABLE_CAMERA_SUPPORT
|
||||||
# define OPTIONAL_CAMERA_SUPPORT
|
# define OPTIONAL_CAMERA_SUPPORT
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -442,6 +442,62 @@ esp_intr_free ( handle -- 0/err )
|
|||||||
timer_isr_register ( group timer xt arg ret -- 0/err )
|
timer_isr_register ( group timer xt arg ret -- 0/err )
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<h5 id="rmt">RMT</h5>
|
||||||
|
These words are inside the <code>RMT</code> vocabulary.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
rmt_set_clk_div ( channel div8 -- err )
|
||||||
|
rmt_get_clk_div ( channel @div8 -- err )
|
||||||
|
rmt_set_rx_idle_thresh ( channel thresh16 -- err )
|
||||||
|
rmt_get_rx_idle_thresh ( channel @thresh16 -- err )
|
||||||
|
rmt_set_mem_block_num ( channel memnum8 -- err )
|
||||||
|
rmt_get_mem_block_num ( channel @memnum8 -- err )
|
||||||
|
rmt_set_tx_carrier ( channel enable highlev lowlev carrierlev -- err )
|
||||||
|
rmt_set_mem_pd ( channel f -- err )
|
||||||
|
rmt_get_mem_pd ( channel @f -- err )
|
||||||
|
rmt_tx_start ( channel f -- err )
|
||||||
|
rmt_tx_stop ( channel -- err )
|
||||||
|
rmt_rx_start ( channel f -- err )
|
||||||
|
rmt_rx_stop ( channel -- err )
|
||||||
|
rmt_tx_memory_reset ( channel -- err )
|
||||||
|
rmt_rx_memory_reset ( channel -- err )
|
||||||
|
rmt_set_memory_owner ( channel owner -- err )
|
||||||
|
rmt_get_memory_owner ( channel @owner -- err )
|
||||||
|
rmt_set_tx_loop_mode ( channel f -- err )
|
||||||
|
rmt_get_tx_loop_mode ( channel @f -- err )
|
||||||
|
rmt_set_rx_filter ( channel enable thresh8 -- err )
|
||||||
|
rmt_set_source_clk ( channel baseclk -- err )
|
||||||
|
rmt_get_source_clk ( channel @baseclk -- err )
|
||||||
|
rmt_set_idle_level ( channel enable level -- err )
|
||||||
|
rmt_get_idle_level ( channel @enable @level -- err )
|
||||||
|
rmt_get_status ( channel @status -- err )
|
||||||
|
rmt_set_rx_intr_en ( channel enable -- err )
|
||||||
|
rmt_set_err_intr_en ( channel enable -- err )
|
||||||
|
rmt_set_tx_intr_en ( channel enable -- err )
|
||||||
|
rmt_set_tx_thr_intr_en (channel enable thresh -- err )
|
||||||
|
rmt_set_gpio ( channel mode gpio# invertsig -- err )
|
||||||
|
rmt_config ( rmt_config_t* )
|
||||||
|
rmt_isr_register ( fn arg allocflags handle -- err )
|
||||||
|
rmt_isr_deregister ( handle -- err )
|
||||||
|
rmt_fill_tx_items ( channel @items items# offset -- err )
|
||||||
|
rmt_driver_install ( channel rxbufsize allocflags -- err )
|
||||||
|
rmt_driver_uinstall ( channel -- err )
|
||||||
|
rmt_get_channel_status ( channel @status -- err )
|
||||||
|
rmt_get_counter_clock ( channel @clockhz -- err )
|
||||||
|
rmt_write_items ( channel @items items# wait -- err )
|
||||||
|
rmt_wait_tx_done ( channel time -- err )
|
||||||
|
rmt_get_ringbuf_handle ( channel @handle -- err )
|
||||||
|
rmt_translator_init ( channel fn -- err )
|
||||||
|
rmt_translator_set_context ( channel @context -- err )
|
||||||
|
rmt_translator_get_context ( channel @@context -- err )
|
||||||
|
rmt_write_sample ( channel src src# wait -- err )
|
||||||
|
rmt_register_tx_end_callback --- NOT SUPPORTED
|
||||||
|
rmt_memory_rw_rst --- DEPRECATED USE rmt_tx_memory_reset or rmt_rx_memory_reset
|
||||||
|
rmt_set_intr_enable_mask --- DEPRECATED interrupt handled by driver
|
||||||
|
rmt_clr_intr_enable_mask --- DEPRECATED interrupt handled by driver
|
||||||
|
rmt_set_pin --- DEPRECATED use rmt_set_gpio instead
|
||||||
|
</pre>
|
||||||
|
|
||||||
<h5 id="tasks">Tasks</h5>
|
<h5 id="tasks">Tasks</h5>
|
||||||
These words are inside the <code>TASKS</code> vocabulary.
|
These words are inside the <code>TASKS</code> vocabulary.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user