资源简介
socketcan提供的linux下的CAN网络工具包
canutils-3.0.2.tar.bz2
代码片段和文件信息
/*
* canutils/canconfig.c
*
* Copyright (C) 2005 2008 Marc Kleine-Budde Pengutronix
* Copyright (C) 2007 Juergen Beisert Pengutronix
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the version 2 of the GNU General Public License
* as published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#ifndef MIN
#define MIN(a b) ((a) < (b) ? (a) : (b))
#endif
#define VALUE_MAX 256
#define SYSFS_PATH_MAX 256
#define SYSFS_MNT_PATH “/sys“
#define SYSFS_PATH_ENV “SYSFS_PATH“
#define CLASS_NET “/class/net/“
static char sysfs_path[SYSFS_PATH_MAX];
static const char *dev;
static int version;
enum can_sysfs_version {
SV_0
SV_1
SV_MAX
};
enum can_sysfs_entries {
SE_BITRATE
SE_MAX
};
static const char *can_sysfs[SV_MAX][SE_MAX] = {
[SV_0][SE_BITRATE] = “can_bitrate“
[SV_1][SE_BITRATE] = “can_bittiming/bitrate“
};
static void help(void)
{
fprintf(stderr “usage:\n\t“
“canconfig bitrate { BR }\n\t\t“
“BR := \n\t\t“
“canconfig mode\n“
#if 0
“MODE\n\t\t“
“MODE := { start }\n\t“
“canconfig setentry [ VALs ]\n\t\t“
“VALs := \n\t\t“
“ bitrate \n\t\t“
“ tq
相关资源
- linux udev源代码
- libv4l-0.6.2-test.tar.gz
- makefile的详细说明文档
- LabVIEW中CAN总线CRC实现
- 利用信号进行进程间通信
- Linux中的网络数据包捕获
- AgiSoft PhotoScan集群部署使用指导
- 基于QT+Linux的网络聊天室
- STM32之can +代码解析.c
- 银行家算法linux下实现
- linux下哲学家进餐问题实现
- UCloner-10.04.7.tar.gz
- 实现canvas 图片拖拽旋转移动 点击转
- linux libgcc_s.so.1 libgcc_s-4.4.5-20110214.
- uClinux-dist-20070130.tar.tar
- linux 实验7
- Linux iptables防火墙深度理解与实战应用
- makefile实验——华农Linux实验8
- quartus_II_13.1链接
- zw_(linuxc)linux进程监控和进程守护程
- linux 下的无线点菜系统
- 在安装Exchange2003服务器时Windows Serve
- libxl注册机源码支持window和linux
- linux操作系统实验二
- Linux基线修复
- wiegand维根协议驱动程序
- ccan_Security.rar
- linux内核中断
- Linux课程设计—基于服务器的文件共享
- 英特尔集成显卡及核心显卡Intel(R)
评论
共有 条评论