mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
[sam] fixing analog on Due, normally
This commit is contained in:
@ -179,11 +179,23 @@ void adc_disable_channel(Adc *p_adc, adc_channel_num_t adc_ch)
|
||||
* \retval 1 means the specified channel is enabled.
|
||||
* 0 means the specified channel is disabled.
|
||||
*/
|
||||
uint32_t adc_get_status(Adc *p_adc, adc_channel_num_t adc_ch)
|
||||
uint32_t adc_get_channel_status(Adc *p_adc, adc_channel_num_t adc_ch)
|
||||
{
|
||||
return p_adc->ADC_CHSR & (1 << adc_ch);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Reads the ADC status.
|
||||
*
|
||||
* \param p_adc Pointer to an ADC instance.
|
||||
*
|
||||
* \retval ADC status register content.
|
||||
*/
|
||||
uint32_t adc_get_status(Adc *p_adc)
|
||||
{
|
||||
return p_adc->ADC_SR;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Reads the ADC result data of the specified channel.
|
||||
*
|
||||
|
Reference in New Issue
Block a user