testspi.h

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

H
49
字号
/*
*******************************************************************************
**  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 :	SPI.h
**  Abstract :	This file implements the definition that relates to the SPI communication 
**              not influenced by the setting in the GUI application. 
**
**  Device :	uPD78F8024
**
**  Compiler :	NEC/CC78K0
**
*******************************************************************************
*/
#ifndef	_MDSPI_
#define _MDSPI_

/* mnemonic of register related to SPI communication control */
#define	CSIE10					CSIM10.7
#define TRMD10					CSIM10.6
#define	DIR10					CSIM10.4
#define	CSOT10					CSIM10.0

/* set value definition of register related to SPI communication control */
#define	CSIM10_INIT_VALUE		0b00010000
#define	CSIC10_INIT_VALUE		0b00000111

/* mnemonic of register related to SPI communication port */
#define	PORT_SCK10				P1.0
#define	PORT_MODE_SCK10			PM1.0
#define	PORT_SO10				P1.2
#define	PORT_MODE_SO10			PM1.2
#define	PORT_SI10				P1.1
#define	PORT_MODE_SI10			PM1.1

/* definition of SS-port input value */
#define	EFFECTIVE				1
#define	INVALIDITY				0

/* function prototypes */
void SPI_init(void);
short  SPI_getValue( unsigned char  ucChannel );

#endif

⌨️ 快捷键说明

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