*******************************************************************************/
/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include "lcd.h"
#include "stdio.h"
#include "led.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
uint32_t TimingDelay =0;
extern uint8_t leds;
/* Private function prototypes -----------------------------------------------*/
void Delay_Ms(uint32_t nTime);
void NVIC_Configuration(void);
void TIM_Config(void);
void LED_Init(void);
/* Private functions ---------------------------------------------------------*/
/**
* @说明 主函数
* @参数 None
* @返回值 None
*/
int main(void)
{
uint8_t string[20]; //
TIM_Config();
LED_Init();
//LCD工作模式配置
STM3210B_LCD_Init();
LCD_Clear(White);
LCD_SetTextColor(White);
LCD_SetBackColor(Blue);
LCD_ClearLine(Line0);
LCD_ClearLine(Line1);
LCD_ClearLine(Line2);
LCD_ClearLine(Line3);
LCD_ClearLine(Line4);
LCD_DisplayStringLine(Line1," TIMER DEMO ");
LCD_DisplayStringLine(Line3," See The LEDs! ");
SysTick_Config(SystemCoreClock/1000); //1ms中断一次
LCD_SetTextColor(Blue);
LCD_SetBackColor(White);
while(1){
//LED
GPIO_Write(GPIOC,~(1<<(leds+7)));
GPIO_SetBits(GPIOD,GPIO_Pin_2);
GPIO_ResetBits(GPIOD,GPIO_Pin_2);
//LCD
sprintf(string,"%s%d","-- LED ON:LD",leds);
LCD_DisplayStringLine(Line6,string);
}
}
错误是..\SRE\main.c(64): warning: #167-D: argument of type "uint8_t *" is incompatible with parameter of type "char *restrict"
..\SRE\main.c: sprintf(string,"%s%d","-- LED ON:LD",leds); |