VLCB SDK
An opinionated SDK for VLCB protocol
Loading...
Searching...
No Matches
can_id_new.c
Go to the documentation of this file.
1#include "vlcb/common/can.h"
2
3#include <assert.h>
4#include <stddef.h>
5
6int vlcb_defs_NewCanId(const uint8_t value, VlcbCanId *const id) {
7 assert(id != NULL);
8
9 const VlcbCanId _id = value;
10
11 if (vlcb_defs_IsCanIdValid(_id)) {
12 *id = _id;
13 return 0;
14 }
15
16 return 1;
17}
int vlcb_defs_NewCanId(const uint8_t value, VlcbCanId *const id)
Definition can_id_new.c:6
bool vlcb_defs_IsCanIdValid(VlcbCanId id)
uint8_t VlcbCanId