return n;
}
-static int snprintf_error_lostarb(char *buf, size_t len, struct canfd_frame *cf)
+static int snprintf_error_lostarb(char *buf, size_t len, const struct canfd_frame *cf)
{
if (len <= 0)
return 0;
return snprintf(buf, len, "{at bit %d}", cf->data[0]);
}
-static int snprintf_error_ctrl(char *buf, size_t len, struct canfd_frame *cf)
+static int snprintf_error_ctrl(char *buf, size_t len, const struct canfd_frame *cf)
{
int n = 0;
return n;
}
-static int snprintf_error_prot(char *buf, size_t len, struct canfd_frame *cf)
+static int snprintf_error_prot(char *buf, size_t len, const struct canfd_frame *cf)
{
int n = 0;
return n;
}
-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)
{
canid_t class, mask;
int i, n = 0, classes = 0;
*
*/
-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.
*/