Typedefs | |
typedef enum adc2_channel_type | adc2_channel_t |
typedef enum adc2_interrupt_type | adc2_interrupt_t |
typedef enum adc2_mode_type | adc2_mode_t |
typedef enum adc2_prescaler_type | adc2_prescaler_t |
typedef enum adc2_ref_type | adc2_ref_t |
Enumerations | |
enum | adc2_channel_type { ADC2_CHANNEL_0 = 0, ADC2_CHANNEL_1 = 1, ADC2_CHANNEL_2 = 2, ADC2_CHANNEL_3 = 3, ADC2_CHANNEL_4 = 4, ADC2_CHANNEL_5 = 5, ADC2_CHANNEL_6 = 6, ADC2_CHANNEL_7 = 7 } |
enum | adc2_interrupt_type { ADC2_INTERRUPT_DISABLE = 0, ADC2_INTERRUPT_ENABLE = 1 << 3 } |
enum | adc2_mode_type { ADC2_MODE_SINGLE_CONVERSION = 0, ADC2_MODE_FREE_RUNNING = 1 << 5 } |
enum | adc2_prescaler_type { ADC2_PRESCALE_DIV2 = 0x00, ADC2_PRESCALE_DIV4 = 0x02, ADC2_PRESCALE_DIV8 = 0x03, ADC2_PRESCALE_DIV16 = 0x04, ADC2_PRESCALE_DIV32 = 0x05, ADC2_PRESCALE_DIV64 = 0x06, ADC2_PRESCALE_DIV128 = 0x07 } |
enum | adc2_ref_type { ADC2_REF_AREF = 0, ADC2_REF_AVCC = 1 << 6, ADC2_REF_INTERNAL_256 = 3 << 6 } |
Functions | |
u_short | adc2_init (adc2_mode_t mode, adc2_interrupt_t use_interrupt, adc2_prescaler_t prescaler, adc2_channel_t channel, adc2_ref_t reference) |
u_short | adc2_read (u_short handle) |
enum adc2_prescaler_type |
u_short adc2_init | ( | adc2_mode_t | mode, | |
adc2_interrupt_t | use_interrupt, | |||
adc2_prescaler_t | prescaler, | |||
adc2_channel_t | channel, | |||
adc2_ref_t | reference | |||
) |
Initializes the ADC.
Samples a value.
the | handle retrieved by adc2_init |