API_LCD.c 1.07 KB
Newer Older
崔立宝's avatar
崔立宝 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#define GLOBALS_API_LCD
#include "../App_Headers/includes.h"


/*-------------------------------------------------------------------------
* Function Name  : Api_LCD_Init
* Description    : 
* Input          : 
* Output         : None
* Return         : None
* onther         : 
--------------------------------------------------------------------------*/
void Api_LCD_Init(void)
{
 /*   INT8U     b;
    INT8U     *bp;

    LCDCR1_LCDSWAI = Disable;               //在停止模式下运行
    LCDCR0_DUTY    = Duty4;                 // 1/4 Duty
    LCDCR0_LCLK    = IRCCLK_1M;             // IRCCLK 1M
    
         
    bp = &LCDRAM0;         
    for(b = 0; b < 20;b++)
    {
         *bp = 0;                           //清零LCDRAM
    }
    
    FPENR0 = clear;  //0-7                 //初始化各段
    FPENR1 = clear;  //8-15                //初始化各段
    FPENR2 = clear;  //16-23               //初始化各段
    FPENR3 = clear;   //24-31               //初始化各段
    FPENR4 = clear;   //32-39               //初始化各段
         
    LCDCR0_LCDEN   = Disable;               //使能LCD */
}