#define ESOS_TASK_RELEASE_IN_COMM | ( | ) |
Signals to other requesting tasks that the ESOS "in" stream is being released or made available again by the current task.
Definition at line 281 of file esos_comm.h.
#define ESOS_TASK_RELEASE_OUT_COMM | ( | ) |
Signals to other requesting tasks that the ESOS "out" stream is being released or made available again by the current task.
Definition at line 291 of file esos_comm.h.
#define ESOS_TASK_SIGNAL_AVAILABLE_IN_COMM | ( | ) |
Signals to other requesting tasks that the current task is making the ESOS "in" stream available again.
Definition at line 262 of file esos_comm.h.
#define ESOS_TASK_SIGNAL_AVAILABLE_OUT_COMM | ( | ) |
Signals to other requesting tasks that the current task is making the ESOS "out" stream available again.
Definition at line 270 of file esos_comm.h.
#define ESOS_TASK_SIGNAL_BUSY_IN_COMM | ( | ) |
Signals to other requesting tasks that the ESOS "in" stream is being used by the current task. ESOS_TASK_WAIT_ON_AVAILABLE_IN_COMM now signals for us when the "in" stream is available.
Definition at line 240 of file esos_comm.h.
#define ESOS_TASK_SIGNAL_BUSY_OUT_COMM | ( | ) |
Signals to other requesting tasks that the ESOS "out" stream is being used by the current task. ESOS_TASK_WAIT_ON_AVAILABLE_OUT_COMM now signals for us when the "out" stream is available.
Definition at line 252 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_AVAILABLE_IN_COMM | ( | ) |
Cause the current task to wait (block) until the ESOS "in" stream is available for use.
Definition at line 216 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_AVAILABLE_OUT_COMM | ( | ) |
Causes the current task to wait (block) until the ESOS "out" stream is available for use. Code will resume once the stream is available for our use. This routine marks the "in" stream in use by the current task.
Definition at line 227 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_GET_STRING | ( | pau8_in | ) |
Create, spawn and wait on a child task to get a string from the ESOS "in" communications buffer. The incoming string must be zero-terminated (useful when reading from other streaming data devices), or terminated with a newline/return character (useful when reading from terminals/keyboards/etc.) Results are written into the array whose address is passed in
This call will block the current task until the data is read
This macro does not evaluate to anything. Data is returned in the argument variable because of the way ESOS tasks, child tasks, and macros are used.
pau8_in | pointer to array in which bytes should be returned |
Definition at line 346 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_GET_U8BUFFER | ( | pau8_in, | |||
u8_size | ) |
Create, spawn and wait on a child task to get an array of bytes (uint8s) from the ESOS "in" communications buffer Results are written into the array whose address is passed in
This macro does not evaluate to anything. Data is returned in the argument variable because of the way ESOS tasks, child tasks, and macros are used.
pau8_in | pointer to array in which bytes should be returned | |
u8_size | number of bytes to read from "in" stream |
Definition at line 325 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_GET_UINT8 | ( | u8_in | ) |
Create, spawn and wait on a child task to get a byte (uint8) from the ESOS "in" communications buffer Results are written into the variable which is passed in
This macro does not evaluate to anything. Data is returned in the argument variable because of the way ESOS tasks, child tasks, and macros are used.
u8_in | variable in which data should be returned |
Definition at line 308 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_SEND_STRING | ( | psz_out | ) |
Create, spawn and wait on a child task to put a zero-terminated string to the ESOS "out" communications buffer.
psz_out | pointer to the zero-terminated string |
Definition at line 392 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_SEND_U8BUFFER | ( | pau8_out, | |||
u8_size | ) |
Create, spawn and wait on a child task to put an array of bytes (uint8s) to the ESOS "out" communications buffer
pau8_out | pointer to beginning of array of bytes to send to "out" stream | |
u8_size | number of bytes to send |
Definition at line 404 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_SEND_UINT32_AS_HEX_STRING | ( | u32_out | ) |
Create, spawn and wait on a child task to put a 32-bit value (uint32) to the ESOS "out" communications buffer as a human-readable hexadecimal string. Results will look like "0x0123BEEF"
u32_out | data to write to "out" stream |
Definition at line 381 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_SEND_UINT8 | ( | u8_out | ) |
Create, spawn and wait on a child task to put a byte (uint8) to the ESOS "out" communications buffer
u8_out | data to write to "out" stream |
Definition at line 357 of file esos_comm.h.
#define ESOS_TASK_WAIT_ON_SEND_UINT8_AS_HEX_STRING | ( | u8_out | ) |
Create, spawn and wait on a child task to put a byte (uint8) to the ESOS "out" communications buffer as a human-readable hexadecimal string. Results will look like "0x4C"
u8_out | data to write to "out" stream |
Definition at line 369 of file esos_comm.h.
#define FLUSH_ESOS_COMM_IN_DATA | ( | ) |
Flushes the "in" communications buffer. All unread data in the "in" communications buffer will be lost.
Definition at line 147 of file esos_comm.h.
#define GET_ESOS_COMM_IN_DATA_LEN | ( | ) |
Evaluates to the number of bytes in the ESOS "in" communications buffer
N | number of bytes current contained in the "in" buffer |
Definition at line 112 of file esos_comm.h.
#define IS_ESOS_COMM_GOT_AT_LEAST_DATA_BYTES | ( | x | ) |
Evaluates to the booelan to determine if "in" communications buffer has at least x bytes
x | number of bytes to check for |
TRUE | if "in" buffer has x bytes or more | |
FALSE | otherwise |
Definition at line 136 of file esos_comm.h.
#define IS_ESOS_COMM_GOT_EXACTLY_DATA_BYTES | ( | x | ) |
Evaluates to the booelan to determine if "in" communications buffer has exactly x bytes
x | number of bytes to check for |
TRUE | if "in" buffer has exactly x bytes | |
FALSE | otherwise |
Definition at line 124 of file esos_comm.h.
#define IS_ESOS_COMM_GOT_IN_DATA | ( | ) |
Evaluates to the booelan to determine if "in" communications buffer any readable bytes
TRUE | if "in" buffer has some data to read | |
FALSE | otherwise |
Definition at line 158 of file esos_comm.h.
#define IS_ESOS_COMM_READY_OUT_DATA | ( | ) |
Evaluates to boolean to that determines whether the "out" system can accept anymore data
TRUE | if "out" communication system buffer has room for 1+ bytes | |
FALSE | otherwise |
Definition at line 207 of file esos_comm.h.
#define PEEK_ESOS_COMM_IN_DATA | ( | x | ) |
Evaluates to a "peek" of the x-th data byte in the "in" communications buffer
Use sparingly. This macro may be deprecated at some point.
ESOS communication systems built upon interrupts (most of them) will make this macro unsafe since the macro could be interrupted.
x | byte in FIFO to "peek" |
data | peeked data byte |
Definition at line 178 of file esos_comm.h.
#define PEEK_ESOS_COMM_IN_LATEST_DATA | ( | ) |
Evaluates to a "peek" of the most recent data byte written to the "in" communications buffer
Use sparingly. This macro may be deprecated at some point.
ESOS communication systems built upon interrupts (most of them) will make this macro unsafe since the macro could be interrupted.
data | peeked data byte |
Definition at line 196 of file esos_comm.h.
void configUART1 | ( | uint32 | u32_baudRate | ) |
Configure the UART. Settings chosen:
u32_baudRate | The baud rate to use. |
Definition at line 104 of file esos_pic24_rs232.c.
uint8 esos_GetCommSystemMaxInDataLen | ( | void | ) |
Returns the size of the ESOS communication systems "in" buffers
uint8 | Number of bytes |
Definition at line 175 of file esos_pic24_rs232.c.
uint8 esos_GetCommSystemMaxOutDataLen | ( | void | ) |
Returns the size of the ESOS communication systems "out" buffers
uint8 | Number of bytes |
Definition at line 203 of file esos_pic24_rs232.c.
uint8 esos_GetCommSystemVersion | ( | void | ) |
Returns the version number of the ESOS communication systems
verNum | Version number. Exact value and meaning depends on hardware |