builds a can header in SFF (standart frame format) or EFF (extended frame formate) with the given information
- Parameters
-
can_id_t | identifier (11/29 bits) + error flag (0=data, 1= error) + remote transmission flag (1=rtr frame) + frame format flag (0=SFF, 1=EFF) |
can_dlc | data length code |
payload | data (maximum 64 bit in an 8*8 array) |
- See Also
- include/linux/can.h
- Return values
-
can | frame if successful |
NULL | if unsuccessful |
- Todo:
- not tested yet
Definition at line 186 of file ce_gw_main.c.
References ce_gw_alloc_can_frame().
189 if (new_can_frame == NULL) {
190 printk (KERN_ERR
"ce_gw_main.c: kmalloc failed in function"
191 "ce_gw_get_header_can \n");
194 new_can_frame->can_id = can_id;
195 new_can_frame->can_dlc = can_dlc;
196 *(u64 *)new_can_frame->data = *(u64 *)payload;
197 return new_can_frame;