⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdrv_initjp.c

📁 炬力方案176*132软件源码,适用于AK1025
💻 C
字号:
/*
********************************************************************************
*                       ACTOS
*                  UI Init function
*
*                (c) Copyright 2002-2003, Actions Co,Ld.
*                        All Right Reserved
*
* File   : UI_Init.msa
* By     : Gongee
* Version: 1> v1.00     first version     10/17/2003 9:47PM
********************************************************************************
*/

#include "display.h"
#include "Drv_S6B33B0A.h"

//#define DEBUG
#ifdef DEBUG
#define ERR(x) x
#define MSG(x) x
#else
#define ERR(x)
#define MSG(x)
#endif

#pragma memory=dataseg(BBD_IE)
SD_FILE *fp;
//extern  unsigned char BufPage;
#pragma memory=default

#pragma memory=constseg(BBS_IE)
char AsciiFontName[] = "ASCII.BIN";
char FontLibName[] = "FONT_JP.$$$";
#pragma memory=default

#pragma codeseg(BBC_IE)
bool    Sdrv_Init(char mode)
{
        fp = SD_FOpen(AsciiFontName,MODE_READ);
        if (fp == NULL)
        {
                ERR(printf("Cannot open Fontlib\n"));
                return 0;
        }
        AsciiFontLibAddr = fp->startaddr;
        SD_FClose(fp);

        fp = SD_FOpen(FontLibName,MODE_READ);
        if (fp == NULL)
        {
                ERR(printf("Cannot open Fontlib\n"));
                return 0;
        }
        FontLibAddr = fp->startaddr;
        SD_FClose(fp);

        BufPage=0x07;           //Buffer默认位于Zram2

           {
            char *i;
            int  *j;
               //********** 显示中断向量的赋值 ********
            i = (char *)RSTDisplayAPI;
            *i = 0xc3;
            i++;
            j = (int *)i;
            *j = (int)Drv_Entrance;
  	   }

        if(mode==0)
        {
             Hdrv_HardInit();

        }
        
        return 1;
}

void Sdrv_Exit(void)
{
    return;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -