Nut/OS  5.0.5
API Reference
stm32_adc.c File Reference
#include <arch/arm.h>
#include <dev/irqreg.h>
#include <sys/event.h>
#include <sys/atom.h>
#include <sys/timer.h>
#include <sys/thread.h>
#include <sys/heap.h>
#include <arch/arm/stm32f10x_rcc.h>
#include <arch/arm/stm32f10x_adc.h>
Include dependency graph for stm32_adc.c:

Defines

#define STM32_ADC_INITIAL_MODE   SINGLE_CONVERSION
#define STM32_ADC_INITIAL_PRESCALE   55
#define STM32_ADC_BUF_SIZE   16
#define _adc_buf_head   STM32_ADC_BUF_SIZE
#define _adc_buf_tail   STM32_ADC_BUF_SIZE+1

Functions

int ADCBufRead (uint16_t channel, uint16_t *read)
 Reads data from the adc buffer.
void ADCSetMode (TADCMode mode)
 Sets the data aquisition mode for the adc.
void ADCEnableChannel (TADCChannel channel)
 Enable a channel used to sample when conversion started.
void ADCDisableChannel (TADCChannel channel)
 Disable a channel.
void ADCSetPrescale (unsigned int prescale)
 Set the prescaler for the adc.
void ADCStartConversion (void)
 Start conversion.
void ADCInit (void)
 Initialize the adc to the configured default values and enable interrupt.

Variables

uint16_t ** ADC_Buffer = NULL