27#define CAN_QUEUE_SIZE 64U
39#define can_queue_init(can_queue) \
41 Queue* queue = &(can_queue)->queue; \
42 queue->num_items = CAN_QUEUE_SIZE; \
43 queue->item_size = sizeof(CanMessage); \
44 queue->storage_buf = (uint8_t*) (&(can_queue)->msg_nodes); \
45 queue_init(&(can_queue)->queue); \
48#define can_queue_push(can_queue, source) \
49 queue_send(&(can_queue)->queue, (source), 0)
51#define can_queue_push_from_isr(can_queue, source, high_prio_woken) \
52 queue_send_from_isr(&(can_queue)->queue, (source), high_prio_woken)
54#define can_queue_peek(can_queue, dest) \
55 queue_peek(&(can_queue)->queue, (dest), 0)
57#define can_queue_pop(can_queue, dest) \
58 queue_receive(&(can_queue)->queue, (dest), 0)
60#define can_queue_pop_from_isr(can_queue, dest, higher_prio_woken) \
61 queue_receive_from_isr(&(can_queue)->queue, (dest), high_prio_woken)
63#define can_queue_size(can_queue) \
64 queue_get_num_items(&(can_queue)->queue)
#define CAN_QUEUE_SIZE
Maximum number of CAN messages permitted for the CAN queue.
Definition: can_queue.h:27
CAN message structure.
Definition: can_msg.h:55
CAN queue data structure to store received CAN messages.
Definition: can_queue.h:34
Queue storage and access struct.
Definition: queues.h:32