1
0
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:
Thibaut VIARD
2011-11-21 12:16:54 +01:00
parent 062278262d
commit 7cbb284eb4
11 changed files with 146 additions and 27 deletions

View File

@ -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.
*