mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-11-05 23:00:24 +00:00
RC
This commit is contained in:
@@ -18,12 +18,12 @@ static esp_err_t joystick_adc_init() {
|
|||||||
|
|
||||||
adc_oneshot_chan_cfg_t config_x = {
|
adc_oneshot_chan_cfg_t config_x = {
|
||||||
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
|
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
|
||||||
.atten = ADC_ATTEN_DB_12,
|
.atten = ADC_ATTEN_DB_6,
|
||||||
|
|
||||||
};
|
};
|
||||||
adc_oneshot_chan_cfg_t config_y = {
|
adc_oneshot_chan_cfg_t config_y = {
|
||||||
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
|
.bitwidth = SOC_ADC_DIGI_MAX_BITWIDTH,
|
||||||
.atten = ADC_ATTEN_DB_12,
|
.atten = ADC_ATTEN_DB_6,
|
||||||
|
|
||||||
};
|
};
|
||||||
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_0, &config_x));
|
||||||
|
|||||||
Reference in New Issue
Block a user