label.c

来自「以ST公司CPU为核心的彩色电视机的完整源程序。」· C语言 代码 · 共 40 行

C
40
字号
/********************** SGS-THOMSON MICROELECTRONICS ************************
FILENAME     : LABEL.C
VERSION      : V1.0
DATE         : JAN 1999
AUTHOR(s)    : ASHISH RUDOLA/ DEEPAK DOSHI
PROCESSOR    : ST92195
DESCRIPTION  : This module implements the channel labeling support. This
               support includes functions for reading, saving, editing, and
               freeing channel labels.
MODIFICATIONS:
	-
*****************************************************************************/

#include "channel.h"
#include "eeprom.h"
#include "i2c_bus.h"
#include "label.h"
#include "osdchar.h"
unsigned char label[4];

/*****************************************************************************
INPUTS     : channel - Current TV channel
OUTPUTS    : label (1, 2, 3 and 4) - Label associated to the current label
             see read_eeprom
             see init_label
DESCRIPTION: This function reads the label stored by the user into the EEPROM
             and store it in RAM locations.
*****************************************************************************/
void read_label(void)	/* from tuning.c */
{
	unsigned int i;				/* Temporary storage */
	unsigned char j;			/* Temporary storage */
	
	/* Get label position into the EEPROM */
	i = EEPROM_START_LABEL_MEMORY + (channel-1) * 4;
	for (j=0; j<4; j++, i++)
		label[j] = read_eeprom(i);
}

⌨️ 快捷键说明

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