File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
ports/espressif/common-hal/analogbufio Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ void common_hal_analogbufio_bufferedin_construct(analogbufio_bufferedin_obj_t *s
95
95
96
96
#if defined(CONFIG_IDF_TARGET_ESP32 )
97
97
if (pin -> adc_index != ADC_UNIT_1 ) {
98
- /*
98
+ /*
99
99
* ESP32 only supports ADC1 unit
100
100
* https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf
101
101
* Table 29-3
@@ -205,7 +205,7 @@ static bool check_valid_data(const adc_digi_output_data_t *data) {
205
205
return false;
206
206
}
207
207
} else {
208
- if ( convert_mode == ADC_CONV_SINGLE_UNIT_1 ) {
208
+ if (convert_mode == ADC_CONV_SINGLE_UNIT_1 ) {
209
209
unit = 0 ;
210
210
} else {
211
211
unit = 1 ;
@@ -236,12 +236,12 @@ uint32_t common_hal_analogbufio_bufferedin_readinto(analogbufio_bufferedin_obj_t
236
236
mp_printf (& mp_plat_print ,"Required bytes: %d\n" ,len );
237
237
#endif // DEBUG_ANALOGBUFIO
238
238
239
- while (captured_bytes < len ) {
239
+ while (captured_bytes < len ) {
240
240
ret_num = 0 ;
241
241
ret = adc_digi_read_bytes (result , NUM_SAMPLES_PER_INTERRUPT , & ret_num , ADC_READ_TIMEOUT_MS );
242
242
243
243
if (ret == ESP_OK ) {
244
- for (uint32_t i = 0 ; i < ret_num ; i += ADC_RESULT_BYTE ) {
244
+ for (uint32_t i = 0 ; i < ret_num ; i += ADC_RESULT_BYTE ) {
245
245
adc_digi_output_data_t * pResult = (adc_digi_output_data_t * ) (void * )& result [i ];
246
246
if (check_valid_data (pResult )) {
247
247
if (captured_bytes < len ) {
You can’t perform that action at this time.
0 commit comments