Skip to content

Commit

Permalink
fix(adc): fixed esp32, esp32s2,esp32s3 adc oneshot mode clk div issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Icarus113 committed Jul 12, 2023
1 parent cadf80e commit d21e332
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/hal/esp32/include/hal/adc_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C" {
Oneshot
---------------------------------------------------------------*/
#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (1)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (2)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (1)

/*---------------------------------------------------------------
DMA
Expand Down
1 change: 0 additions & 1 deletion components/hal/esp32c2/include/hal/adc_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ extern "C" {
Oneshot
---------------------------------------------------------------*/
#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1)

/*---------------------------------------------------------------
DMA
Expand Down
1 change: 0 additions & 1 deletion components/hal/esp32c3/include/hal/adc_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ extern "C" {
Oneshot
---------------------------------------------------------------*/
#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1)

/*---------------------------------------------------------------
DMA
Expand Down
1 change: 0 additions & 1 deletion components/hal/esp32c6/include/hal/adc_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ extern "C" {
Oneshot
---------------------------------------------------------------*/
#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (2)

/*---------------------------------------------------------------
DMA
Expand Down
1 change: 0 additions & 1 deletion components/hal/esp32h2/include/hal/adc_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ extern "C" {
Oneshot
---------------------------------------------------------------*/
#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (2)

/*---------------------------------------------------------------
DMA
Expand Down
2 changes: 1 addition & 1 deletion components/hal/esp32s2/include/hal/adc_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
Oneshot
---------------------------------------------------------------*/
#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (1)

/*---------------------------------------------------------------
DMA
Expand Down
2 changes: 1 addition & 1 deletion components/hal/esp32s3/include/hal/adc_ll.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extern "C" {
Oneshot
---------------------------------------------------------------*/
#define ADC_LL_DATA_INVERT_DEFAULT(PERIPH_NUM) (0)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1)
#define ADC_LL_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (1)

/*---------------------------------------------------------------
DMA
Expand Down

0 comments on commit d21e332

Please sign in to comment.