]> rtime.felk.cvut.cz Git - can-utils.git/blobdiff - lib.h
candump: Enable HW timestamping before using it
[can-utils.git] / lib.h
diff --git a/lib.h b/lib.h
index 805914c18f11bc2fac9faa3c034325e5688ea936..2837278a3639c5f327114701e0886190052ab015 100644 (file)
--- a/lib.h
+++ b/lib.h
  *
  */
 
+#ifndef CAN_UTILS_LIB_H
+#define CAN_UTILS_LIB_H
+
+#include <stdio.h>
+
 /* buffer sizes for CAN frame string representations */
 
 #define CL_ID (sizeof("12345678##1"))
@@ -102,7 +107,7 @@ int parse_canframe(char *cs, struct canfd_frame *cf);
  * 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
@@ -146,7 +151,7 @@ void fprint_canframe(FILE *stream , struct canfd_frame *cf, char *eol, int sep,
 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
@@ -203,8 +208,10 @@ void sprint_long_canframe(char *buf , struct canfd_frame *cf, int view, int maxd
  *
  */
 
-void snprintf_can_error_frame(char *buf, size_t len, struct canfd_frame *cf,
-                             char *sep);
+void snprintf_can_error_frame(char *buf, size_t len, const struct canfd_frame *cf,
+                  const char *sep);
 /*
  * Creates a CAN error frame output in user readable format.
  */
+
+#endif