测试SPI读取ID一读取就跑飞[AppleScript]
纯文本查看 复制代码
#include "spi.h"#include "sst25.h"void delay(unsigned long ms); //延时毫秒函数void SYS_Init(); //系统时钟初始化函数unsigned long int id1,id2;int main( void ){ // Stop watchdog
timer to prevent time out reset WDTCTL = WDTPW + WDTHOLD; SYS_Init(); SPI_Init(); _EINT(); while(1){ id1=Read_ID();_NOP();id2=Jedec_ID_Read() ; _NOP(); }}
这是主函数,请教!
一周热门 更多>