#include "main.h" #include "bsp_init.h" #include "usart1.h" #include "usart5.h" #include "delay.h" #include "SMI.h" unsigned int aa=0; char adc1_str[5]={0},adc2_str[5]={0},adc3_str[5]={0},adc_str[28]={'A','B','0',':',0,0,0,0,0,'C','H','1',':',0,0,0,0,0,'C','H','2',':',0,0,0,0,0,}; int main(void) { Bsp_Configuration(); uart1_init(); uart5_init(); SendInfo(&COMM1); Set_reset(0);//复位 while(1) { Set_Led(); // SMI_write(0,16,0x218c); // aa=SMI_read(0,16); aa=SMI_read(0,3);//identifier ;modle number;revision number Set_Duplex(0,0);//半双工 aa=SMI_read(0,0); Set_Duplex(0,1);//半双工 aa=SMI_read(0,0); Set_Speed(0,0);//10M aa=SMI_read(0,0); Set_Speed(0,1);//100M aa=SMI_read(0,0); Set_Auto(0,1);//启动自协商 aa=SMI_read(0,0); while(1); // USART_SendData(USART1,'U'); usart1_send(); usart1_receive(); usart5_send(); usart5_receive(); } }
C test code
原创
©著作权归作者所有:来自51CTO博客作者plan1230的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
C code
代码记录
#include -
c misc test
/* *Filename: hl.c
c date file domain function -
c++ code
namespace用法。
c++ 算法 开发语言 #include ios -
C# Code
N年前的代码了,好久没用C#,早忘记了...1.保存对话框 private void btnSaveData_Clic
System Text Windows