Lines Matching refs:frame

24 	struct can_frame frame;  member
86 const struct can_frame *frame) in can_shell_print_frame() argument
88 uint8_t nbytes = can_dlc_to_bytes(frame->dlc); in can_shell_print_frame()
98 shell_fprintf_normal(sh, "(%05d) ", frame->timestamp); in can_shell_print_frame()
106 (frame->flags & CAN_FRAME_BRS) == 0 ? '-' : 'B', in can_shell_print_frame()
107 (frame->flags & CAN_FRAME_ESI) == 0 ? '-' : 'P'); in can_shell_print_frame()
112 (frame->flags & CAN_FRAME_IDE) != 0 ? 0 : 5, "", in can_shell_print_frame()
113 (frame->flags & CAN_FRAME_IDE) != 0 ? 8 : 3, in can_shell_print_frame()
114 (frame->flags & CAN_FRAME_IDE) != 0 ? in can_shell_print_frame()
115 frame->id & CAN_EXT_ID_MASK : frame->id & CAN_STD_ID_MASK); in can_shell_print_frame()
119 (frame->flags & CAN_FRAME_FDF) != 0 ? "" : " ", in can_shell_print_frame()
120 (frame->flags & CAN_FRAME_FDF) != 0 ? 2 : 1, in can_shell_print_frame()
124 if ((frame->flags & CAN_FRAME_RTR) != 0) { in can_shell_print_frame()
128 shell_fprintf_normal(sh, "%02x ", frame->data[i]); in can_shell_print_frame()
191 static void can_shell_rx_callback(const struct device *dev, struct can_frame *frame, in can_shell_rx_callback() argument
199 event.frame = *frame; in can_shell_rx_callback()
232 can_shell_print_frame(can_shell_rx_msgq_sh, event.dev, &event.frame); in can_shell_rx_msgq_triggered_work_handler()
726 struct can_frame frame = { 0 }; in cmd_can_send() local
742 frame.flags = 0; in cmd_can_send()
743 frame.dlc = 0; in cmd_can_send()
751 frame.flags |= CAN_FRAME_IDE; in cmd_can_send()
755 frame.flags |= CAN_FRAME_RTR; in cmd_can_send()
758 frame.flags |= CAN_FRAME_FDF; in cmd_can_send()
761 frame.flags |= CAN_FRAME_BRS; in cmd_can_send()
785 (frame.flags & CAN_FRAME_IDE) != 0 ? 8 : 3, in cmd_can_send()
790 frame.id = val; in cmd_can_send()
793 if (nbytes > ARRAY_SIZE(frame.data)) { in cmd_can_send()
798 frame.dlc = can_bytes_to_dlc(nbytes); in cmd_can_send()
813 frame.data[i] = val; in cmd_can_send()
825 (frame.flags & CAN_FRAME_IDE) != 0 ? "extended" : "standard", in cmd_can_send()
826 (frame.flags & CAN_FRAME_IDE) != 0 ? 29 : 11, in cmd_can_send()
827 (frame.flags & CAN_FRAME_IDE) != 0 ? 8 : 3, frame.id, in cmd_can_send()
828 (frame.flags & CAN_FRAME_RTR) != 0 ? 1 : 0, in cmd_can_send()
829 (frame.flags & CAN_FRAME_FDF) != 0 ? 1 : 0, in cmd_can_send()
830 (frame.flags & CAN_FRAME_BRS) != 0 ? 1 : 0, in cmd_can_send()
831 frame.dlc); in cmd_can_send()
833 err = can_send(dev, &frame, K_NO_WAIT, can_shell_tx_callback, UINT_TO_POINTER(frame_no)); in cmd_can_send()