|
ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
|
ICARUS Pipe - Message Pipes (Circular Buffer Queues) More...
#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
Functions | |
| bool | pipe_init (uint8_t pipe_idx, uint16_t pipe_capacity_bytes) |
| Initialize a message pipe. | |
| bool | pipe_enqueue (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Enqueue bytes to pipe. | |
| bool | pipe_dequeue (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Dequeue bytes from pipe. | |
| uint16_t | pipe_get_count (uint8_t pipe_idx) |
| Get current byte count in pipe. | |
| uint16_t | pipe_get_max_count (uint8_t pipe_idx) |
| Get pipe capacity. | |
| bool | pipe_can_enqueue (uint8_t pipe_idx, uint8_t message_bytes) |
| Check if pipe can accept data (SVC call gate) | |
| bool | pipe_can_dequeue (uint8_t pipe_idx, uint8_t message_bytes) |
| Check if pipe has data available (SVC call gate) | |
| void | pipe_write_bytes (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Write bytes to pipe (SVC call gate) | |
| void | pipe_read_bytes (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Read bytes from pipe (SVC call gate) | |
| bool | __pipe_init (uint8_t pipe_idx, uint16_t pipe_capacity_bytes) |
| Privileged implementation of pipe_init. | |
| bool | __pipe_enqueue (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Privileged implementation of pipe_enqueue. | |
| bool | __pipe_dequeue (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Privileged implementation of pipe_dequeue. | |
| uint16_t | __pipe_get_count (uint8_t pipe_idx) |
| Privileged implementation of pipe_get_count. | |
| uint16_t | __pipe_get_max_count (uint8_t pipe_idx) |
| Privileged implementation of pipe_get_max_count. | |
| bool | __pipe_can_enqueue (uint8_t pipe_idx, uint8_t message_bytes) |
| Privileged call gate: can pipe accept message_bytes bytes? | |
| bool | __pipe_can_dequeue (uint8_t pipe_idx, uint8_t message_bytes) |
| Privileged call gate: can pipe deliver message_bytes bytes? | |
| void | __pipe_write_bytes (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Privileged write gate: write bytes to pipe buffer. | |
| void | __pipe_read_bytes (uint8_t pipe_idx, uint8_t *message, uint8_t message_bytes) |
| Privileged write gate: read bytes from pipe buffer. | |
ICARUS Pipe - Message Pipes (Circular Buffer Queues)
Byte-stream message pipes for inter-task communication.
Definition in file pipe.h.
| bool __pipe_can_dequeue | ( | uint8_t | pipe_idx, |
| uint8_t | message_bytes | ||
| ) |
Privileged call gate: can pipe deliver message_bytes bytes?
Definition at line 163 of file pipe.c.
References icarus_pipe_t::count, ICARUS_MAX_MESSAGE_QUEUES, and message_pipe_list.
Referenced by pipe_can_dequeue(), and SVC_Handler_C().
| bool __pipe_can_enqueue | ( | uint8_t | pipe_idx, |
| uint8_t | message_bytes | ||
| ) |
Privileged call gate: can pipe accept message_bytes bytes?
Definition at line 149 of file pipe.c.
References ICARUS_MAX_MESSAGE_QUEUES, and message_pipe_list.
Referenced by __sb_publish(), pipe_can_enqueue(), and SVC_Handler_C().
| bool __pipe_dequeue | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Privileged implementation of pipe_dequeue.
Definition at line 94 of file pipe.c.
References ICARUS_MAX_MESSAGE_QUEUES, message_pipe_list, pipe_can_dequeue(), pipe_read_bytes(), and task_active_sleep().
Referenced by pipe_dequeue().
| bool __pipe_enqueue | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Privileged implementation of pipe_enqueue.
Definition at line 64 of file pipe.c.
References ICARUS_MAX_MESSAGE_QUEUES, message_pipe_list, pipe_can_enqueue(), pipe_write_bytes(), and task_active_sleep().
Referenced by pipe_enqueue().
| uint16_t __pipe_get_count | ( | uint8_t | pipe_idx | ) |
Privileged implementation of pipe_get_count.
Definition at line 123 of file pipe.c.
References icarus_pipe_t::count, ICARUS_MAX_MESSAGE_QUEUES, and message_pipe_list.
Referenced by pipe_get_count(), and SVC_Handler_C().
| uint16_t __pipe_get_max_count | ( | uint8_t | pipe_idx | ) |
Privileged implementation of pipe_get_max_count.
Definition at line 135 of file pipe.c.
References ICARUS_MAX_MESSAGE_QUEUES, icarus_pipe_t::max_count, and message_pipe_list.
Referenced by pipe_get_max_count(), and SVC_Handler_C().
| bool __pipe_init | ( | uint8_t | pipe_idx, |
| uint16_t | pipe_capacity_bytes | ||
| ) |
Privileged implementation of pipe_init.
Definition at line 35 of file pipe.c.
References icarus_pipe_t::buffer, icarus_pipe_t::count, icarus_pipe_t::dequeue_idx, icarus_pipe_t::engaged, icarus_pipe_t::enqueue_idx, ICARUS_MAX_MESSAGE_BYTES, ICARUS_MAX_MESSAGE_QUEUES, icarus_pipe_t::max_count, message_pipe_list, os_tick_count, and icarus_pipe_t::tick_updated_at.
Referenced by pipe_init(), and SVC_Handler_C().
| void __pipe_read_bytes | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Privileged write gate: read bytes from pipe buffer.
Definition at line 199 of file pipe.c.
References icarus_pipe_t::buffer, icarus_pipe_t::count, icarus_pipe_t::dequeue_idx, ICARUS_MAX_MESSAGE_QUEUES, icarus_pipe_t::max_count, message_pipe_list, os_tick_count, and icarus_pipe_t::tick_updated_at.
Referenced by pipe_read_bytes(), and SVC_Handler_C().
| void __pipe_write_bytes | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Privileged write gate: write bytes to pipe buffer.
Definition at line 176 of file pipe.c.
References icarus_pipe_t::buffer, icarus_pipe_t::count, icarus_pipe_t::enqueue_idx, ICARUS_MAX_MESSAGE_QUEUES, icarus_pipe_t::max_count, message_pipe_list, os_tick_count, and icarus_pipe_t::tick_updated_at.
Referenced by __sb_publish(), pipe_write_bytes(), and SVC_Handler_C().
| bool pipe_can_dequeue | ( | uint8_t | pipe_idx, |
| uint8_t | message_bytes | ||
| ) |
Check if pipe has data available (SVC call gate)
| pipe_idx | Pipe index |
| message_bytes | Number of bytes to dequeue |
Check if pipe has data available (SVC call gate)
Definition at line 1011 of file svc.c.
References __pipe_can_dequeue(), and SVC_PIPE_CAN_DEQUEUE.
Referenced by __pipe_dequeue().
| bool pipe_can_enqueue | ( | uint8_t | pipe_idx, |
| uint8_t | message_bytes | ||
| ) |
Check if pipe can accept data (SVC call gate)
| pipe_idx | Pipe index |
| message_bytes | Number of bytes to enqueue |
Check if pipe can accept data (SVC call gate)
Definition at line 988 of file svc.c.
References __pipe_can_enqueue(), and SVC_PIPE_CAN_ENQUEUE.
Referenced by __pipe_enqueue().
| bool pipe_dequeue | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Dequeue bytes from pipe.
| pipe_idx | Pipe index |
| message | Buffer to receive data |
| message_bytes | Number of bytes to read |
Dequeue bytes from pipe.
Definition at line 894 of file svc.c.
References __pipe_dequeue().
| bool pipe_enqueue | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Enqueue bytes to pipe.
| pipe_idx | Pipe index |
| message | Data to enqueue |
| message_bytes | Number of bytes |
Enqueue bytes to pipe.
Definition at line 887 of file svc.c.
References __pipe_enqueue().
| uint16_t pipe_get_count | ( | uint8_t | pipe_idx | ) |
Get current byte count in pipe.
| pipe_idx | Pipe index |
Definition at line 901 of file svc.c.
References __pipe_get_count(), and SVC_PIPE_GET_COUNT.
| uint16_t pipe_get_max_count | ( | uint8_t | pipe_idx | ) |
Get pipe capacity.
| pipe_idx | Pipe index |
Definition at line 921 of file svc.c.
References __pipe_get_max_count(), and SVC_PIPE_GET_MAX_COUNT.
| bool pipe_init | ( | uint8_t | pipe_idx, |
| uint16_t | pipe_capacity_bytes | ||
| ) |
Initialize a message pipe.
| pipe_idx | Pipe index (0 to ICARUS_MAX_MESSAGE_QUEUES-1) |
| pipe_capacity_bytes | Maximum bytes the pipe can hold |
Definition at line 865 of file svc.c.
References __pipe_init(), and SVC_PIPE_INIT.
| void pipe_read_bytes | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Read bytes from pipe (SVC call gate)
| pipe_idx | Pipe index |
| message | Pointer to buffer for message data |
| message_bytes | Number of bytes to read |
Read bytes from pipe (SVC call gate)
Definition at line 1095 of file svc.c.
References __pipe_read_bytes(), and SVC_PIPE_READ_BYTES.
Referenced by __pipe_dequeue().
| void pipe_write_bytes | ( | uint8_t | pipe_idx, |
| uint8_t * | message, | ||
| uint8_t | message_bytes | ||
| ) |
Write bytes to pipe (SVC call gate)
| pipe_idx | Pipe index |
| message | Pointer to message data |
| message_bytes | Number of bytes to write |
Write bytes to pipe (SVC call gate)
Definition at line 1074 of file svc.c.
References __pipe_write_bytes(), and SVC_PIPE_WRITE_BYTES.
Referenced by __pipe_enqueue().