int can_try_recv(struct can_frame *frame) { if (rx_queue_pop(frame) == NULL) { return -1; }; return 0; }
void can_rx_recv(struct can_frame *frame) { queue_lock_wait(); // Wait for frame to be added rx_queue_pop(frame); }
void can_recv(struct can_frame *frame) { while (rx_queue_pop(frame) == NULL); }