📄 spi1.c
字号:
/*****************************************************************************
*
* File: spi1.c
*
* Copyright S. Brennen Ball, 2006-2007
*
* The author provides no guarantees, warantees, or promises, implied or
* otherwise. By using this software you agree to indemnify the author
* of any damages incurred by using it.
*
*****************************************************************************/
#include "spi1.h"
//#include "LPC214x.h"
#include "msp430x22x4.h"
void spi1_open()
{
//在初始化中打开
}
int spi1_read()
{
//do nothing
return 1;
}
unsigned char spi1_send_read_byte(unsigned char byte)
{
int rec_val;
while (!(IFG2 & UCB0TXIFG));
UCB0TXBUF = byte;
while (!(IFG2 & UCB0RXIFG));
rec_val = UCB0RXBUF;
return (unsigned char)rec_val;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -