void adc_test(void)
{
    u16_t adc_val;
 
    // Initialise modules
    adc_init();
    uart0_init();
    printf_init();

    // Enable global interrupts
    sei();
  
    // Select ADC0
    adc_sel_channel(0);
   
    // Sample channel
    adc_val = adc_get_sample();

    PRINTF("\nADC Value = %d -> Voltage = %2.2f V\n", 
           adc_val,
           ((float)adc_val)*(3.3/1024.0));
}
int app_adc_notify_cfg_ind_handler(ke_msg_id_t const msgid,
                                      struct adc_notify_cfg_ind const *param,
                                      ke_task_id_t const dest_id,
                                      ke_task_id_t const src_id)
{	
    
    if (param->val == PRF_CLI_START_NTF)
    {
        adc_init(GP_ADC_SE, 0); // Single ended mode
        adc_enable_channel(ADC_CHANNEL_P01);  //
    
        app_adc_notify_upd_char(SWAP(adc_get_sample()));
    
        app_timer_set(APP_ADC_SAMPLING_TIMER, TASK_APP, APP_ADC_SAMPLING_TIMEOUT); //5 sec
    }
    else if (param->val == PRF_CLI_STOP_NTFIND)
    {
        ke_timer_clear(APP_ADC_SAMPLING_TIMER, TASK_APP); //5 sec
    }
    
    return (KE_MSG_CONSUMED);
}