📄 testspi.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 : 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -