摘要:
根据te6410移植mcp2515到tiny6410,将tiny按照te的连线如下tiny6410,linux2.6.38移植mcp251x
使用spi1,eint8 1.修改板子文件mach-mini6410.c,加入plateform平台设备
先加入头文件 //for spi add by medconn
#include #include #include //for mcp251x add by medconn
#include #include 在static struct platform_device *mini6410_devices[] __initda... 阅读全文
摘要:
can测试-refer to ok6410自带例子//server.c
//server.c
#include #include #include #ifndef PF_CAN
#define PF_CAN 29
#endif #ifndef AF_CAN
#define AF_CAN PF_CAN
#endif int main()
{ int s; unsigned long nbytes,len; struct sockaddr_can addr; struct ifreq ifr; struct can_frame frame; s = socket(PF_... 阅读全文