mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-31 06:12:42 +00:00
refactor(ledc): deprecate ledc_isr_register and ledc_channel_config_t::intr_type
This commit is contained in:
@@ -332,14 +332,6 @@ There are several individual timer-specific functions that can be used to change
|
||||
The first function is called "behind the scenes" by :cpp:func:`ledc_timer_config` to provide a startup of a timer after it is configured.
|
||||
|
||||
|
||||
Use Interrupts
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
When configuring an LEDC channel, one of the parameters selected within :cpp:type:`ledc_channel_config_t` is :cpp:type:`ledc_intr_type_t` which triggers an interrupt on fade completion.
|
||||
|
||||
For registration of a handler to address this interrupt, call :cpp:func:`ledc_isr_register`.
|
||||
|
||||
|
||||
Power Management
|
||||
----------------
|
||||
|
||||
|
@@ -58,6 +58,10 @@ LEDC
|
||||
|
||||
- Removed esp_driver_gpio as a public required component from esp_driver_ledc.
|
||||
|
||||
- :func:`ledc_isr_register` has been deprecated. LEDC interrupt handling is implemented by driver itself, please only register event callbacks if necessary.
|
||||
|
||||
- :cpp:member:`ledc_channel_config_t::intr_type` has been deprecated. `LEDC_INTR_FADE_END` interrupt enable / disable control is handled by the driver internally. Users can still register a callback for this interrupt by :cpp:func:`ledc_cb_register`.
|
||||
|
||||
I2C
|
||||
---
|
||||
|
||||
|
@@ -332,14 +332,6 @@ LED PWM 控制器 API 有多种方式即时改变 PWM 频率:
|
||||
第一个定时器复位函数在函数 :cpp:func:`ledc_timer_config` 内部完成所有定时器配置后会被调用一次。
|
||||
|
||||
|
||||
使用中断
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
配置 LED PWM 控制器通道时,可在 :cpp:type:`ledc_channel_config_t` 中选取参数 :cpp:type:`ledc_intr_type_t` ,在渐变完成时触发中断。
|
||||
|
||||
要注册处理程序来处理中断,可调用函数 :cpp:func:`ledc_isr_register`。
|
||||
|
||||
|
||||
电源管理
|
||||
--------
|
||||
|
||||
|
@@ -58,6 +58,10 @@ LEDC
|
||||
|
||||
- esp_driver_gpio 不再作为 esp_driver_ledc 的公共依赖组件。
|
||||
|
||||
- :func:`ledc_isr_register` 已被弃用。LEDC 中断处理由驱动内部实现,如果需要注册中断回调,仅需要注册事件回调即可。
|
||||
|
||||
- :cpp:member:`ledc_channel_config_t::intr_type` 已被弃用。`LEDC_INTR_FADE_END` 中断使能/禁用控制由驱动内部处理。用户仍可以通过 :cpp:func:`ledc_cb_register` 注册该中断的回调。
|
||||
|
||||
I2C
|
||||
---
|
||||
|
||||
|
Reference in New Issue
Block a user