Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 181 → Rev 182

/trunk/analog.c
59,7 → 59,6
#include "analog.h"
#include "timer1.h"
#include "config.h"
#include "led.h"
 
AnalogData_t AnalogData;
 
82,14 → 81,14
 
void Analog_Init(void)
{
ADC_InitTypeDef ADC_InitStructure;
ADC_InitTypeDef ADC_InitStructure;
 
UART1_PutString("\r\n ADC init...");
 
SCU_APBPeriphClockConfig(__GPIO4, ENABLE); // Enable the GPIO4 Clock
 
ADC_DeInit(); // reset register to default values
 
// configure port 4 pins as analog inputs
GPIO_ANAPinConfig(GPIO_ANAChannel1, ENABLE);
GPIO_ANAPinConfig(GPIO_ANAChannel2, ENABLE);
101,7 → 100,7
 
ADC_Cmd(ENABLE); // power on the ADC
ADC_StandbyModeCmd(DISABLE); // disable Standby Mode
ADC_StructInit(&ADC_InitStructure);
ADC_StructInit(&ADC_InitStructure);
ADC_InitStructure.ADC_Channel_1_Mode = ADC_NoThreshold_Conversion;
ADC_InitStructure.ADC_Channel_2_Mode = ADC_NoThreshold_Conversion;
ADC_InitStructure.ADC_Channel_3_Mode = ADC_NoThreshold_Conversion;
116,7 → 115,7
 
ADC_PrescalerConfig(255); // PCLK/255 (24MHz/255 = 94.1kHZ )
ADC_ITConfig(ADC_IT_ECV, ENABLE); // enable end of conversion IRQ
 
VIC_Config(ADC_ITLine, VIC_IRQ, PRIORITY_ADC);
VIC_ITCmd(ADC_ITLine, ENABLE);
 
/trunk/main.h
4,7 → 4,7
 
#define VERSION_MAJOR 0
#define VERSION_MINOR 17
#define VERSION_PATCH 1
#define VERSION_PATCH 2
 
#define VERSION_SERIAL_MAJOR 10
#define VERSION_SERIAL_MINOR 1