📄 spi.h
字号:
////////////////////////////////////////////////////////////////////////////////////////////////////
/// @file spi.h
/// @author Simon Qian(webmaster@SimonQian.com)
/// @date Last Update on 2008-04-07
/// @brief headerfile for spi.c
/// @par license
/// AVRminiProg is distributed under the terms and conditions of GPLv2, see License.txt
////////////////////////////////////////////////////////////////////////////////////////////////////
// Only Support Master Mode
#define SPI_DATA_LEN 8
#define SPI_MSB (1 << (SPI_DATA_LEN - 1))
void SPI_Init(void);
#define SPI_Disable() SPCR = 0
#define SPI_IsReady() (SPSR & (1 << SPIF))
#define SPI_SetData(d) SPDR = d
#define SPI_GetData() SPDR
#define SPI_WaitReady() while (!SPI_IsReady())
uint8 SPI_RW_Emu(uint8 data);
uint8 SPI_RW_HW(uint8 data);
void SPI_SetClk(uint8 ps);
uint8 SPI_RW(uint8 data);
extern uint8 SPI_Emu;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -