1、/* File Name : main.c* Author : Wuhan R/static unsigned long ticks;/unsigned char Clock1s;/* Private macro -*/* Private variables -*/ADC_InitTypeDef ADC_InitStructure;DMA_InitTypeDef DMA_InitStructure;vu16 ADC_ConvertedValue;ErrorStatus HSEStartUpStatus;/* Private function prototypes -*/void RCC_Con
2、figuration(void);void GPIO_Configuration(void);void NVIC_Configuration(void);void SysTick_Configuration(void);void USART_Configuration1(void);void SetupClock (void);int fputc(int ch, FILE *f); /* Private functions -*/* Function Name : main* Description : Main program* Input : None* Output : None* Re
3、turn : None*/#define LED1ON GPIO_SetBits(GPIOF,GPIO_Pin_0) #define LED1OFF GPIO_ResetBits(GPIOF,GPIO_Pin_0) /片选 cs#define LED2ON GPIO_SetBits(GPIOF,GPIO_Pin_1) #define LED2OFF GPIO_ResetBits(GPIOF,GPIO_Pin_1)/复位 rest#define LED3ON GPIO_SetBits(GPIOF,GPIO_Pin_2) #define LED3OFF GPIO_ResetBits(GPIOF,G
4、PIO_Pin_2)/数据 sdata#define LED4ON GPIO_SetBits(GPIOF,GPIO_Pin_3) #define LED4OFF GPIO_ResetBits(GPIOF,GPIO_Pin_3)/时钟 sclkunsigned char Ver=A; /驱动版本,默认为 A 版本,一共 4 个版本void delayms(unsigned int ii)/1ms 延时函数unsigned int i,x;for (x=0;x4,1);send(valuesend(value,1);elsefor(y = 0; y SR #endif return (ch);/* (C) COPYRIGHT 2007 STMicroelectronics *END OF FILE*/