This commit is contained in:
2025-01-05 14:53:31 -05:00
parent 7a9b9bf909
commit 0f6270fabf

View File

@@ -19,11 +19,11 @@ static esp_err_t joystick_adc_init() {
adc_oneshot_chan_cfg_t config_x = {
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
.atten = ADC_ATTEN_DB_11,
.atten = ADC_ATTEN_DB_12,
};
adc_oneshot_chan_cfg_t config_y = {
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
.atten = ADC_ATTEN_DB_11,
.atten = ADC_ATTEN_DB_12,
};
ESP_ERROR_CHECK(adc_oneshot_config_channel(adc_xy_handle, ADC1_CHANNEL_0, &config_x));
ESP_ERROR_CHECK(adc_oneshot_config_channel(adc_xy_handle, ADC1_CHANNEL_1, &config_y));