?? main.c
字號:
/***************************************************************************************
* File: main.c
* Author: Embest YY.wang
* Desc: Char LCD function
* History:
DB0-----PA24 DB4-----PA28 RW-------PA22
DB1-----PA25 DB5-----PA29 RS-------PA21
DB2-----PA26 DB6-----PA30 E--------PA23
DB3-----PA27 DB7-----PA31 背光燈VCC接J301的Pin36(5V)
*********************************************************************************************/
/*------------------------------------------------------------------------------------------*/
/* include files */
/*------------------------------------------------------------------------------------------*/
#include "Lcd.h"
#include "Board.h"
#include <stdlib.h>
#include <stdio.h>
Uchar ptr[]={"Welcom to Embest"};
Uchar ptr2[]={"ATEBSAM7S Board"};
/*********************************************************************************************
* name: Main
* func:
* para:
* ret:
* modify:
* comment:
*********************************************************************************************/
void Main(void)
{
int i;
// First, enable the clock of the PIO
AT91F_PMC_EnablePeriphClock ( AT91C_BASE_PMC, 1 << AT91C_ID_PIOA );
AT91F_PIO_CfgPullup( AT91C_BASE_PIOA, LCM_CONTROL| LCM_PORT );
// then, we configure the PIO Lines corresponding to LED1 to LED3
// to be outputs. No need to set these pins to be driven by the PIO because it is GPIO pins only.
AT91F_PIO_CfgOutput( AT91C_BASE_PIOA, LCM_CONTROL );
DelayMs(400);
LcdReset();
i = 0;
while(1)
{
ePutstr(0,0,ptr);
ePutstr(1,1,ptr2);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -