资源简介
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
相关资源
- stm32f407上的两个can发送和接收例程
- CANopen使用手册_埃斯顿
- CanuMobiSim
- uboot到linux logo显示不间断 补丁
- UNIX/LINUX编程实践教程的源码
- Linux任务管理器
- linux应用层的华容道游戏源代码
- 28335CAN调试程序
- ubuntu9.10 可加载内核模块和字符设备驱
- MP3文件ID3v2ID3v2APEv2标签读取
- UART转CAN或LIN的工具(Uart2any)和文档
- 28335写的用spi读取传感器数据并用CA
- 操作系统实验——虚存管理实验
- wwwscan-很强大的后台扫描工具
- linux下的发包工具sendip
- 尚观培训linux许巍关于c 的笔记和讲义
- 尚观培训linux董亮老师关于数据结构的
- linux 线程池源码 c 版
- linux C 电梯程序练习
- linux下用多进程同步方法解决生产者
- Linux 操作系统实验(全)
- Linux From Scratch 中文手册
- linux 网络实验 ftp程序
- Linux命令大全离线版&在线版
- 操作系统共享内存实验
- dos 下运行Linux 命令--gnu_utils
- linux 0.12内核源代码
- linux简易shell C实现
- linux实验报告及心得体会
- 基于GTK的Linux环境下的简易任务管理器
评论
共有 条评论