📄 svc_spi.h
字号:
/************************************************************************************
* File : svc_spi.h *
* Programmer: Konrad Wei (Taiwan) *
* November 2006 *
*************************************************************************************
- 2006 November. Add Slave Mode
*************************************************************************************/
#ifndef _SVC_SPI_H_
#define _SVC_SPI_H_
#if UCOSII
#include <includes.h>
#endif
//#include "../stdafx.h"
#include "Board.h"
/*
*********************************************************************************************************
* Definition
*********************************************************************************************************
*/
#ifndef U8
#define U8 unsigned char
#endif
#ifndef U16
#define U16 unsigned short
#endif
#ifndef U32
#define U32 unsigned long
#endif
#define SPI_NPCS0 (unsigned int)1<<11
#define SPI_MISO (unsigned int)1<<12
#define SPI_MOSI (unsigned int)1<<13
#define SPI_SPCK (unsigned int)1<<14
#define SPI_CS0_ID 11 ///< PIO11 SPI CS 0
#define SPI_CS1_ID 9 ///< PIO9 SPI CS 1
#define SPI_CS2_ID 10 ///< PIO10 SPI CS 2
#define SPI_CS3_ID 22 ///< PIO22 SPI CS 3
#define SPI_CS0 (1<<SPI_CS0_ID) ///< PIO11 SPI CS 0
#define SPI_CS1 (1<<SPI_CS1_ID) ///< PIO9 SPI CS 1
#define SPI_CS2 (1<<SPI_CS2_ID) ///< PIO10 SPI CS 2
#define SPI_CS3 (1<<SPI_CS3_ID) ///< PIO22 SPI CS 3
/*
*********************************************************************************************************
* Extern Function
*********************************************************************************************************
*/
extern void spi_init (void);
extern U8 svc_spi_SendByte( const U8 sendData);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -