|
|
@ -93,8 +93,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#if !(defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
|
|
|
|
#if !(defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
|
|
|
|
defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
|
|
|
|
defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
|
|
|
|
defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
|
|
|
|
defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
|
|
|
defined(__AVR_ATmega32U6__))
|
|
|
|
|
|
|
|
#error The ADC peripheral driver is not currently available for your selected microcontroller model.
|
|
|
|
#error The ADC peripheral driver is not currently available for your selected microcontroller model.
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
@ -276,8 +275,7 @@
|
|
|
|
static inline void ADC_SetupChannel(const uint8_t ChannelIndex)
|
|
|
|
static inline void ADC_SetupChannel(const uint8_t ChannelIndex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
|
|
|
|
#if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
|
|
|
|
defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
|
|
|
|
defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__))
|
|
|
|
defined(__AVR_ATmega32U6__))
|
|
|
|
|
|
|
|
DDRF &= ~(1 << ChannelIndex);
|
|
|
|
DDRF &= ~(1 << ChannelIndex);
|
|
|
|
DIDR0 |= (1 << ChannelIndex);
|
|
|
|
DIDR0 |= (1 << ChannelIndex);
|
|
|
|
#elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
|
|
|
#elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
|
|
@ -318,8 +316,7 @@
|
|
|
|
static inline void ADC_DisableChannel(const uint8_t ChannelIndex)
|
|
|
|
static inline void ADC_DisableChannel(const uint8_t ChannelIndex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
|
|
|
|
#if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
|
|
|
|
defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__) || \
|
|
|
|
defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB647__))
|
|
|
|
defined(__AVR_ATmega32U6__))
|
|
|
|
|
|
|
|
DDRF &= ~(1 << ChannelIndex);
|
|
|
|
DDRF &= ~(1 << ChannelIndex);
|
|
|
|
DIDR0 &= ~(1 << ChannelIndex);
|
|
|
|
DIDR0 &= ~(1 << ChannelIndex);
|
|
|
|
#elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
|
|
|
#elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
|
|
|