Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo for adc_continuous_data typedef in esp32-hal-adc.h/.c #9529

Merged
merged 3 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cores/esp32/esp32-hal-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static uint8_t __adcContinuousAtten = ADC_11db;
static uint8_t __adcContinuousWidth = SOC_ADC_DIGI_MAX_BITWIDTH;

static uint8_t used_adc_channels = 0;
adc_continuos_data_t *adc_result = NULL;
adc_continuous_data_t *adc_result = NULL;

static bool adcContinuousDetachBus(void *adc_unit_number) {
adc_unit_t adc_unit = (adc_unit_t)adc_unit_number - 1;
Expand Down Expand Up @@ -537,7 +537,7 @@ bool analogContinuous(uint8_t pins[], size_t pins_count, uint32_t conversions_pe
}

//Allocate and prepare result structure for adc readings
adc_result = malloc(pins_count * sizeof(adc_continuos_data_t));
adc_result = malloc(pins_count * sizeof(adc_continuous_data_t));
for (int k = 0; k < pins_count; k++) {
adc_result[k].pin = pins[k];
adc_result[k].channel = channel[k];
Expand Down Expand Up @@ -578,7 +578,7 @@ bool analogContinuous(uint8_t pins[], size_t pins_count, uint32_t conversions_pe
return true;
}

bool analogContinuousRead(adc_continuos_data_t **buffer, uint32_t timeout_ms) {
bool analogContinuousRead(adc_continuous_data_t **buffer, uint32_t timeout_ms) {
if (adc_handle[ADC_UNIT_1].adc_continuous_handle != NULL) {
uint32_t bytes_read = 0;
uint32_t read_raw[used_adc_channels];
Expand Down
4 changes: 2 additions & 2 deletions cores/esp32/esp32-hal-adc.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extern "C" {
uint8_t channel; /*!<ADC channel */
int avg_read_raw; /*!<ADC average raw data */
int avg_read_mvolts; /*!<ADC average voltage in mV */
} adc_continuos_data_t;
} adc_continuous_data_t;

/*
* Setup ADC continuous peripheral
Expand All @@ -96,7 +96,7 @@ extern "C" {
/*
* Read ADC continuous conversion data
* */
bool analogContinuousRead(adc_continuos_data_t** buffer, uint32_t timeout_ms);
bool analogContinuousRead(adc_continuous_data_t** buffer, uint32_t timeout_ms);

/*
* Start ADC continuous conversions
Expand Down
Loading