📄 mcu_spi_config.h
字号:
/**
* Copyright (c) 2004, Freescale Semiconductor
* Freescale Confidential Proprietary
*
* File name : mcu_spi_config.h
* Project name: SMAC (Simple Media Access Controller)
*
* Author : Larry Roshak
* Department : Freescale Radio Products Division
*
* Description : This is the SMAC C source driver header file for SPI
* Driver in the MCU. The header defines all externals, prototypes and
* mask bits used by the actual C driver.
*
* History :
* 17/04/2004 : Initial Development. (FLR005)
* 07/01/2005 : Code Standarization. (A19259)
*/
#ifndef _SPI_DRIVERS_H
#define _SPI_DRIVERS_H
#include "pub_def.h"
#include "mcu_hw_config.h"
/* SPI Function Defines */
void SPIInit(void);
/*
* SPIWaitTransferDone : Waits until the SPI1D has been
* transferred and received
*
* Parameters : None
*
* Return : None
*/
#define SPIWaitTransferDone() while (!(SPI1S_SPRF));
/*
* SPI_ClearRecieveStatReg : Clears any flags that may be activated in the
* the SPI Data Register.
*
* Parameters : None
*
* Return : None
*/
#define SPIClearRecieveStatReg() u8TempValue = SPI1S;
/*
* SPIClearRecieveDataReg : Clear receive data register. SPI entirely ready
* for read or write
*
* Parameters : None
*
* Return : None
*/
#define SPIClearRecieveDataReg() u8TempValue = SPI1D;
/*
* SPI_SendChar : Sends a Char through the SPI port that is being used
*
* Parameters : u8Char - Char to be sent through the SPI
*
* Return : None
*/
#define SPISendChar(u8Char) SPI1D = u8Char;
/*
* SPIRead : Returns the data that is in the SPI port.
*
* Parameters : None
*
* Return : UINT8 - Data that is in the SPI port being used.
*/
#define SPIRead() SPI1D
#endif /* _SPI_DRIVERS_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -