mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-04 03:52:01 +02:00
refactor(examples): reformat peripheral examples with astyle_py
This commit is contained in:
@@ -41,7 +41,6 @@ static adc_channel_t channel[2] = {ADC_CHANNEL_2, ADC_CHANNEL_3};
|
||||
static TaskHandle_t s_task_handle;
|
||||
static const char *TAG = "EXAMPLE";
|
||||
|
||||
|
||||
static bool IRAM_ATTR s_conv_done_cb(adc_continuous_handle_t handle, const adc_continuous_evt_data_t *edata, void *user_data)
|
||||
{
|
||||
BaseType_t mustYield = pdFALSE;
|
||||
@@ -103,7 +102,7 @@ void app_main(void)
|
||||
ESP_ERROR_CHECK(adc_continuous_register_event_callbacks(handle, &cbs, NULL));
|
||||
ESP_ERROR_CHECK(adc_continuous_start(handle));
|
||||
|
||||
while(1) {
|
||||
while (1) {
|
||||
|
||||
/**
|
||||
* This is to show you the way to use the ADC continuous mode driver event callback.
|
||||
|
||||
@@ -52,7 +52,6 @@ static int voltage[2][10];
|
||||
static bool example_adc_calibration_init(adc_unit_t unit, adc_channel_t channel, adc_atten_t atten, adc_cali_handle_t *out_handle);
|
||||
static void example_adc_calibration_deinit(adc_cali_handle_t handle);
|
||||
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
//-------------ADC1 Init---------------//
|
||||
@@ -76,7 +75,6 @@ void app_main(void)
|
||||
bool do_calibration1_chan0 = example_adc_calibration_init(ADC_UNIT_1, EXAMPLE_ADC1_CHAN0, EXAMPLE_ADC_ATTEN, &adc1_cali_chan0_handle);
|
||||
bool do_calibration1_chan1 = example_adc_calibration_init(ADC_UNIT_1, EXAMPLE_ADC1_CHAN1, EXAMPLE_ADC_ATTEN, &adc1_cali_chan1_handle);
|
||||
|
||||
|
||||
#if EXAMPLE_USE_ADC2
|
||||
//-------------ADC2 Init---------------//
|
||||
adc_oneshot_unit_handle_t adc2_handle;
|
||||
@@ -139,7 +137,6 @@ void app_main(void)
|
||||
#endif //#if EXAMPLE_USE_ADC2
|
||||
}
|
||||
|
||||
|
||||
/*---------------------------------------------------------------
|
||||
ADC Calibration
|
||||
---------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user