Commit Graph

66 Commits

Author SHA1 Message Date
Darian Leung
57fd78f5ba freertos: Remove legacy data types
This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
2022-02-09 23:05:45 +08:00
songruojing
68e12f7092 ledc: Add ledc_fade_stop API to support stopping the fade operation.
Note that ESP32 cannot support this new feature.
2022-01-25 11:19:20 +08:00
songruojing
be2ab09832 ledc: Fix FADE_NO_WAIT mode concurrency problem.
Add test cases for fade concurrency issue and fade timing check.

Closes https://github.com/espressif/esp-idf/issues/6710
2022-01-25 11:19:10 +08:00
songruojing
e175086226 ledc: Simplify the procedure to perform a one-time duty update
Avoid adding one extra fade cycle when performing a one-time duty update.
Add some notes to ledc_get_duty and ledc_update_duty APIs, so that users
are aware of when the new duty will be effective.

Closes https://github.com/espressif/esp-idf/issues/7288
2022-01-24 19:36:13 +08:00
morris
e51474ef70 build: fix unused tag string
Closes https://github.com/espressif/esp-idf/issues/8250
2022-01-18 10:06:08 +08:00
Michael (XIAO Xufeng)
466f3a91cb ledc: fixed check to s_ledc_fade_rec array 2022-01-06 03:28:05 +00:00
Omar Chebib
1e8a0909f6 LEDC: divisor calculation will now be rounded up when necessary
Closes https://github.com/espressif/esp-idf/issues/7722
2021-11-11 12:21:22 +08:00
Omar Chebib
aa2ca7dd94 LEDC: improved support for ESP32-C3 and refactored divisor calculation
As ESP32C3 does not have support for REF_TICK source clock, it is now not
possible to select it anymore.
Auto cfg clock has been improved for all boards.
2021-11-11 12:21:15 +08:00
morris
16677b0d3c global: make periph enable/disable APIs private
peripheral enable/disable usually should be managed by driver itself,
so make it as espressif private APIs, not recommended for user to use it
in application code.
However, if user want to re-write the driver or ports to other platform,
this is still possible by including the header in this way:
"esp_private/peripheral_ctrl.h"
2021-11-08 10:37:47 +08:00
morris
c2d5af17a2 dac: apply generic check macro 2021-08-26 14:01:24 +08:00
songruojing
9d098cc9bd ledc: Add a callback for LEDC fade end
This commit adds a feature where users can register a callback that is
called when an LEDC fade completes.
2021-07-29 17:56:22 +08:00
Michael (XIAO Xufeng)
dd47340d0e Merge branch 'update_copyright_notice_driver_part_4' into 'master'
driver: update copyright notice, part 4

See merge request espressif/esp-idf!13652
2021-05-31 07:37:19 +00:00
Jan Brudný
690974e32f driver: update copyright notice 2021-05-25 17:43:57 +02:00
bizhuangyang
31cdeb538d ledc: apply general check macro
Standardize LEDC_CHECK() and LEDC_ARG_CHECK() in ledc.c to ESP_RETURN_ON_FALSE() in esp_check.h.
2021-05-13 16:57:16 +08:00
laokaiyao
48c848a895 driver/ledc: support invert channel output 2021-05-11 11:54:16 +08:00
Omar Chebib
cd79f3907d gpio: Disable USB JTAG when setting pins 18 and 19 as GPIOs on ESP32C3
When `DIS_USB_JTAG` eFuse is NOT burned (`False`), it is not possible
to set pins 18 and 19 as GPIOs. This commit solves this by manually
disabling USB JTAG when using pins 18 or 19.
The functions shall use `gpio_hal_iomux_func_sel` instead of
`PIN_FUNC_SELELECT`.
2021-04-08 14:01:18 +08:00
morris
753a929525 global: fix sign-compare warnings 2021-01-12 14:05:08 +08:00
Angus Gratton
27a9cf861e driver: Add esp32c3 drivers (except ADC/DAC) and update tests
Some ESP32-C3 drivers are still pending.

Based on internal commit 3ef01301fffa552d4be6d81bc9d199c223224305
2020-12-23 09:53:24 +11:00
Angus Gratton
5228d9f9ce esp32c3: Apply one-liner/small changes for ESP32-C3 2020-12-01 10:58:50 +11:00
morris
2917651478 esp_rom: extract common ets apis into esp_rom_sys.h 2020-07-27 15:27:01 +08:00
morris
a4d0033c03 esp_rom: extract common GPIO apis into esp_rom_gpio.h 2020-07-07 11:40:19 +08:00
morris
e30cd361a8 global: rename esp32s2beta to esp32s2 2020-01-22 12:14:38 +08:00
chenjianqiang
41fca84064 bugfix(ledc): fix crash when use one speed mode and enable ledc fade test case 2019-12-16 02:49:26 +00:00
chenjianqiang
857dec108d feat(ledc): refactor ledc driver
1. add hal and low-level layer for ledc driver
2. support esp32s2beta ledc
2019-11-21 16:25:22 +08:00
houwenxiang
30b2e02088 bugfix(LEDC):fix ledc CI issue for esp32s2beta. 2019-11-14 12:20:29 +08:00
Angus Gratton
0a0bb09585 Merge 'master' into feature/esp32s2beta_update 2019-08-20 13:55:23 +10:00
Angus Gratton
6990a7cd54 Merge branch 'master' into feature/esp32s2beta_update 2019-08-19 15:03:43 +10:00
Angus Gratton
1dd2f3e07b driver: ledc: Fix low/high speed parameter setting
Fix regression introduced in 2e8c85d8ff
2019-08-15 06:53:46 +00:00
Angus Gratton
04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
kooho
2e8c85d8ff driver(ledc): fixed ledc clock selection bug. 2019-08-06 16:11:18 +08:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
kooho
f98e7bbccf Update LEDC, PCNT,Timer_Group driver for esp32s2beta. 2019-07-31 16:03:22 +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
morris
f5b03c9ea3 misc adjustment of esp32 component 2019-04-03 19:57:46 +08:00
Wangjialin
d518a19d95 driver(ledc): fix ledc fade API and update the register header file
1. fix error when fading is too fast
2. fix error when setting duty and update immediately
3. update register header file to be in accord with TRM

closes https://github.com/espressif/esp-idf/issues/2903
2019-01-12 00:56:38 +08:00
Wangjialin
ab44c6ecc2 bugfix(ledc): fix bugs reported from unit-test and github.
1. In ledc_set_duty_and_update, return if duty updated. Close https://github.com/espressif/esp-idf/issues/2082
2. fix ledc_set_freq function for low speed mode.
2018-07-10 02:22:23 +08:00
kooho
1bebec05c6 driver(ledc): fix duty and fade issues and add thread-safe version APIs.
1. Fix the duty fade check issue reported from https://github.com/espressif/esp-idf/issues/1914
2. Fix the duty overflow issue when duty_scale is set to 1.
3. Fix the duty fade error when a fade operation is under way. We must configure a new duty setting after the previous fade operation has finished due to hardware limit.
4. Add thread-safe version APIs to set duty and fade.
5. Correct the duty range in driver.
2018-05-14 12:27:21 +08:00
Angus Gratton
feb64c3be6 ledc driver: Clarify logging of function argument errors
Some parameter errors did not specify which parameter was invalid.

Adds a new macro to name the invalid param.
2018-05-10 17:21:35 +08:00
Liu Zhi Fu
ed46976f41 esp32/bt/driver: support static allocation of FreeRTOS queues used by ISR routine
Support static allocation of FreeRTOS queues used by ISR routine in WiFi/BT/esp_timer/driver etc
2018-04-27 15:02:30 +08:00
Jiang Jiang Jian
c672fc54fd Merge branch 'feature/ledc_more_meaningful_parameter_names' into 'master'
Provided more meaningful parameter names by renaming 'bit_num' to 'duty_resoluti…

See merge request !1440
2017-12-01 19:33:53 +08:00
panfeng
b553c925b1 bugfix: while scale equals 0 will cause crash 2017-11-23 17:56:18 +08:00
krzychb
d488bb7bac Provided more meaningful parameter names by renaming 'bit_num' to 'duty_resolution' and 'div_num' to 'clock_divider' 2017-11-15 08:08:12 +01:00
Kewal Shah
c4f15a0e5d ledc_get_duty return type changed from int to uint32_t, target_duty changed from int to uint32_t 2017-09-13 01:43:42 +08:00
qianyicheng
acec9b9d35 bugfix(ledc): fix integer divided by zero in function ledc_set_fade_with_time 2017-07-21 19:06:44 +08:00
Angus Gratton
fd3ef4cdfe Merge branch 'bugfix/github_fixes' into 'master'
Various fixes from Github

Some one-line fixes from Github PRs.

See merge request !689
2017-04-21 12:27:32 +08:00
Jonathan Kaufmann
bf82b441ae Fixed bug in ledc_set_fade_with_step where returned while holding critical section.
Merges PR #515 https://github.com/espressif/esp-idf/pull/515
2017-04-21 11:03:07 +10:00
Michel Pollet
349a77cb55 components/driver: 'const' all config calls.
Some were, some weren't. They all could/should be.

Signed-off-by: Michel Pollet <buserror@gmail.com>
2017-04-13 18:33:33 +01:00
Wangjialin
7670e93639 Feature: add ledc low speed channels
1. Add low speed channels for LEDC module.
2. Improve fade object allocate mechanism.
3. Improve ledc example, add 2 low speed channels in example.
4. Remove debug code
5. Improve the register bit field name of slow clock.
2017-03-17 17:26:30 +08:00
Wangjialin
6b5e734901 driver: ledc - update fading functions, add example and doc
1. add fading functions.
2. clear up ledc.c and ledc.h
3. update api doc.
4. add ledc example
5. edit ledc.rst and add readme for example code.
6. add s_ prefix for static global values.
7. add mutex for fade functions
8. minor changes according to the comments.
2017-01-05 17:57:52 +08:00