#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mmu.h"
#include "typedef.h"
#include "S3C2451_gpio.h"
#include "S3C2451_uart.h"
#include "S3C2451_lcd.h"
#include "S3C2451_adc.h"
//#include "S3C2451_irq.h"
//#include "S3C2451_eint.h"
//#define CON 0x56000010
//#define DAT 0x56000014
extern const unsigned char ch[][16];
extern const unsigned char gImage_image[];
extern const unsigned char gImage_lamando[69128];
unsigned char one[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
void delay(unsigned int count)
{
int j = 1000;
int i = 0;
while(--j)
for(i = count; i > 0; i --);
}
void Main()
{
//U32 i;
U32 adcReg,adcValue;
//float adcValue;
char buffer[128];
//MMU³õʼ»¯£ºÔÚ³ÌÐò×ʼµÄʱºòµ÷ÓÃ
MMU_Init();
//LCD¶Ë¿Ú³õʼ»¯
LCD_GPIO_Init();
//LCD³õʼ»¯
LCD_Init();
//ÇåÆÁº¯Êý,ÆÁÄ»±ä³ÉºÚÉ«
LCD_Clear(~0);
//LCDDisplay_String(100,100,0,"asdasdasd");
//LCDDisplay_Char(10,10,0,'5');
//LCDDisplay_String(24,10,0,"asdfghjkl");
//i = 12;
LCD_Display_Bmp(0,0,480,272,gImage_lamando);
adcReg = read_adc(0);
adcValue = 330 * adcReg / 1024;
LCDDisplay_String(0,0,0,"123456789");
sprintf(buffer,"adcValue is %d",adcValue);
LCDDisplay_String(100,240,0,buffer);
//LCDDisplay_Char(10,8,0,(i/10) + '0');
//LCDDisplay_Char(10,16,0,(i%10) + '0');
LCDDisplay_String(141,240,0,"asdfghjkl");
//LCD_Display_Bmp(0,0,480,272,gImage_image);
while(1)
{
delay(100);
}
}
ARMlcd的简单使用
最新推荐文章于 2024-12-25 11:08:35 发布