testani.h

来自「这是一个基于nec78f8024的led驱动程序」· C头文件 代码 · 共 46 行

H
46
字号
/*
*******************************************************************************
**  COPYRIGHT (C) NEC Electronics Corporation 2008
**  NEC ELECTRONICS CONFIDENTIAL AND PROPRIETARY
**  All rights reserved by NEC Electronics Corporation.
**  Use of copyright notice does not evidence publication.
**
**  Filename :	ANI.h
**  Abstract :	This file implements the definition that relates to the analog input 
**              not influenced by the setting in the GUI application. 
**
**  Device :	uPD78F8024
**
**  Compiler :	NEC/CC78K0
**
*******************************************************************************
*/
#ifndef	_MDANI_
#define _MDANI_

/* mnemonic of register related to A/D converter control */
#define	AD_CONVERT_CHANNEL	ADS
#define	ADCE				ADM.0
#define	ADCS				ADM.7

/* set value definition of register related to A/D converter control */
#define	ADPC_INIT_VALUE		0b00000000

/* mnemonic of register related to analog input port */
#define	PORT_MODE_ANALOG_0	PM2.0
#define	PORT_MODE_ANALOG_1	PM2.1
#define	PORT_MODE_ANALOG_2	PM2.2
#define	PORT_MODE_ANALOG_3	PM2.3

/* function prototypes */
void ANI0_init(void);
void ANI1_init(void);
void ANI2_init(void);
void ANI3_init(void);
short ANI0_getValue(void);
short ANI1_getValue(void);
short ANI2_getValue(void);
short ANI3_getValue(void);

#endif

⌨️ 快捷键说明

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