change(lp_adc): Cleanup LP ADC driver and example

This commit is contained in:
Sudeep Mohanty
2026-02-09 12:36:04 +01:00
parent a6c11f9e84
commit b9c375d09b
3 changed files with 77 additions and 21 deletions
@@ -33,7 +33,7 @@ static void lp_uart_init(void)
static void lp_core_init(void)
{
/* Set LP core wakeup source as the HP CPU */
/* Set LP core wakeup source as the LP timer */
ulp_lp_core_cfg_t cfg = {
.wakeup_source = ULP_LP_CORE_WAKEUP_SOURCE_LP_TIMER,
.lp_timer_sleep_duration_us = 1000000,
@@ -8,6 +8,7 @@
#include "sdkconfig.h"
#include "ulp_lp_core_print.h"
#include "ulp_lp_core_lp_adc_shared.h"
#include "ulp_lp_core_uart.h"
#define EXAMPLE_LP_ADC1_CHAN0 CONFIG_EXAMPLE_LP_ADC1_CHANNEL_0_SELECT
#define EXAMPLE_LP_ADC1_CHAN1 CONFIG_EXAMPLE_LP_ADC1_CHANNEL_1_SELECT
@@ -28,6 +29,7 @@ int main (void)
lp_core_printf("lpadc1 chan1 converted value = %d mV\r\n", adc_converted_value[1]);
lp_core_printf("\n");
lp_core_uart_tx_flush(LP_UART_NUM_0);
return 0;
}