📄 testi2c.h
字号:
/*
*******************************************************************************
** 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 : I2C.h
** Abstract : This file implements the definition that relates to the I2C communication
** not influenced by the setting in the GUI application.
**
** Device : uPD78F8024
**
** Compiler : NEC/CC78K0
**
*******************************************************************************
*/
#ifndef _MDI2C_
#define _MDI2C_
/* mnemonic of register related to I2C communication */
#define IICE0 IICC0.7
#define IICRSV IICF0.0
#define STCEN IICF0.1
#define SPD0 IICS0.0
#define STD0 IICS0.1
#define COI0 IICS0.4
#define TRC0 IICS0.3
#define WREL0 IICC0.5
/* set value definition of register related to I2C communication */
#define IICC0_INIT_VALUE 0b00011100
#define IICX0_INIT_VALUE 0b00000000
/* Mnemonic of register that relates to port used by I2C communication */
#define PORT_SDA0 P6.1
#define PORT_MODE_SDA0 PM6.1
#define PORT_SCL0 P6.0
#define PORT_MODE_SCL0 PM6.0
/* function prototypes */
void I2C_init(void);
short I2C_getValue( unsigned char ucChannel );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -