📄 font.c
字号:
/* **********************************************************************
Copyright (c) 2002-2006 Beyond Innovation Technology Co., Ltd
All rights are reserved. Reproduction in whole or in parts is
prohibited without the prior written consent of the copyright owner.
----------------------------------------------------------------------
Module: FONT.C - User Font.
Purpose: Implementation of FONT.
Version: 0.01 10:41AM 2005/11/18
Compiler: Keil 8051 C Compiler v8.01
Reference:
[1] BIT1611B Data Sheet Version 1.0, 2005-11-10,
Beyond Innovation Technology
----------------------------------------------------------------------
Modification:
R0.01 10:41AM 2005/11/18 Jeffrey Chang
Reason:
1. Original.
Solution:
********************************************************************** */
#define _FONT_C_
/* ------------------------------------
Header Files
------------------------------------ */
#include "bitek.h"
#include "font.h"
#include "led.h"
#include "osd.h"
#include "vp.h"
/* ------------------------------------
Macro Definitions
------------------------------------ */
/* ------------------------------------
Type Definitions
------------------------------------ */
/* ------------------------------------
Variables Definitions
------------------------------------ */
/* ------------------------------------
Function Prototypes
------------------------------------ */
static void FONT_SetUserFontRAM(UB8 bTargetIdx, UB8 bSourceIdx);
/* -------------------------------------------------------------------
Name: FONT_SetUserFontRAM -
Purpose: To setup User Font RAM for monochrome and color font.
Passed: None.
Returns: None.
Notes:
------------------------------------------------------------------- */
void FONT_SetUserFontRAM (
UB8 bTargetIdx, // User Font: 0x00..0x0F, OSD Code: 0x70..0x7F
UB8 bSourceIdx // 0x00..0x0F
)
{
UB8 b162;
b162 = BITEK_RxByte(VP_MAD, VP_162_EXTOSD_ATTR) & ~VP_MASK_BANK_SEL;
if (bTargetIdx < 0x08)
// Bank 0
BITEK_TxByte(VP_MAD, VP_162_EXTOSD_ATTR, b162);
else
// Bank 1
BITEK_TxByte(VP_MAD, VP_162_EXTOSD_ATTR, b162 | VP_MASK_BANK_SEL);
bTargetIdx &= 0x07;
BITEK_TxBurst(VP_MAD,
VP_0700_07FF_USER_FONT_RAM + FONT_USER_SIZE * bTargetIdx,
FONT_USER_SIZE,
&abUserFont[ bSourceIdx ][ 0 ]
);
} /* FONT_SetUserFontRAM */
/* -------------------------------------------------------------------
Name: FONT_Init -
Purpose: Initiate FONT.
Passed: None.
Returns: None.
Notes:
------------------------------------------------------------------- */
void FONT_Init (void)
{
// User Font 0x0F (0x7F) for BITEK icon !
FONT_SetUserFontRAM(0x0F, 0x00);
// User Font 0x0E (0x7E) for SHARPNESS icon !
FONT_SetUserFontRAM(0x0E, 0x01);
// User Font 0x0D (0x7D) for IMAGE FILTER icon !
FONT_SetUserFontRAM(0x0D, 0x02);
// User Font 0x0C (0x7C) for MIRROR icon !
FONT_SetUserFontRAM(0x0C, 0x03);
// User Font 0x0B (0x7B) for DISPLAY MODE icon !
FONT_SetUserFontRAM(0x0B, 0x04);
} /* FONT_Init */
/* -------------------------------------------------------------------
Name: -
Purpose: .
Passed: None.
Returns: None.
Notes:
------------------------------------------------------------------- */
/* **********************************************************************
Description:
********************************************************************** */
/* %% End Of File %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -