Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
#define ENOTSUPP 524 /* Operation is not supported */
#endif
#define ENOTSUPP 524 /* Operation is not supported */
#endif
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#define do_div(a,b) a = (a) / (b)
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#define do_div(a,b) a = (a) / (b)
/* log CAN frame with absolute timestamp & device */
fprintf(logfile, "(%010ld.%06ld) ", tv.tv_sec, tv.tv_usec);
fprintf(logfile, "%*s ", max_devname_len, devname[idx]);
/* log CAN frame with absolute timestamp & device */
fprintf(logfile, "(%010ld.%06ld) ", tv.tv_sec, tv.tv_usec);
fprintf(logfile, "%*s ", max_devname_len, devname[idx]);
- /* without seperator as logfile use-case is parsing */
+ /* without separator as logfile use-case is parsing */
fprint_canframe(logfile, &frame, "\n", 0, maxdlen);
}
fprint_canframe(logfile, &frame, "\n", 0, maxdlen);
}
fprintf(stderr, " <received_can_id> & mask == value & mask\n");
fprintf(stderr, "\n");
fprintf(stderr, "When using more than one CAN interface the options\n");
fprintf(stderr, " <received_can_id> & mask == value & mask\n");
fprintf(stderr, "\n");
fprintf(stderr, "When using more than one CAN interface the options\n");
- fprintf(stderr, "m/v/i/e have comma seperated values e.g. '-m 0,7FF,0'\n");
+ fprintf(stderr, "m/v/i/e have comma separated values e.g. '-m 0,7FF,0'\n");
fprintf(stderr, "\nUse interface name '%s' to receive from all CAN interfaces.\n\n", ANYDEV);
}
fprintf(stderr, "\nUse interface name '%s' to receive from all CAN interfaces.\n\n", ANYDEV);
}
fprintf(stderr, " <can_id>##<flags>{data} for CAN FD frames\n\n");
fprintf(stderr, "<can_id> can have 3 (SFF) or 8 (EFF) hex chars\n");
fprintf(stderr, "{data} has 0..8 (0..64 CAN FD) ASCII hex-values (optionally");
fprintf(stderr, " <can_id>##<flags>{data} for CAN FD frames\n\n");
fprintf(stderr, "<can_id> can have 3 (SFF) or 8 (EFF) hex chars\n");
fprintf(stderr, "{data} has 0..8 (0..64 CAN FD) ASCII hex-values (optionally");
- fprintf(stderr, " seperated by '.')\n");
+ fprintf(stderr, " separated by '.')\n");
fprintf(stderr, "<flags> a single ASCII Hex value (0 .. F) which defines");
fprintf(stderr, " canfd_frame.flags\n\n");
fprintf(stderr, "e.g. 5A1#11.2233.44556677.88 / 123#DEADBEEF / 5AA# / ");
fprintf(stderr, "<flags> a single ASCII Hex value (0 .. F) which defines");
fprintf(stderr, " canfd_frame.flags\n\n");
fprintf(stderr, "e.g. 5A1#11.2233.44556677.88 / 123#DEADBEEF / 5AA# / ");
for (i=0, dlen=0; i < maxdlen; i++){
for (i=0, dlen=0; i < maxdlen; i++){
- if(cs[idx] == DATA_SEPERATOR) /* skip (optional) seperator */
+ if(cs[idx] == DATA_SEPERATOR) /* skip (optional) separator */
idx++;
if(idx >= len) /* end of string => end of data */
idx++;
if(idx >= len) /* end of string => end of data */
* CAN FD frames
* - string layout <can_id>##<flags>{data}
* - <flags> a single ASCII Hex value (0 .. F) which defines canfd_frame.flags
* CAN FD frames
* - string layout <can_id>##<flags>{data}
* - <flags> a single ASCII Hex value (0 .. F) which defines canfd_frame.flags
- * - {data} has 0 to 64 hex-values that can (optionally) be seperated by '.'
+ * - {data} has 0 to 64 hex-values that can (optionally) be separated by '.'
* - return value on successful parsing: CANFD_MTU
*
* Return value on detected problems: 0
* - return value on successful parsing: CANFD_MTU
*
* Return value on detected problems: 0
void sprint_canframe(char *buf , struct canfd_frame *cf, int sep, int maxdlen);
/*
* Creates a CAN frame hexadecimal output in compact format.
void sprint_canframe(char *buf , struct canfd_frame *cf, int sep, int maxdlen);
/*
* Creates a CAN frame hexadecimal output in compact format.
- * The CAN data[] is seperated by '.' when sep != 0.
+ * The CAN data[] is separated by '.' when sep != 0.
*
* The type of the CAN frame (CAN 2.0 / CAN FD) is specified by maxdlen:
* maxdlen = 8 -> CAN2.0 frame
*
* The type of the CAN frame (CAN 2.0 / CAN FD) is specified by maxdlen:
* maxdlen = 8 -> CAN2.0 frame