Platform independent unsigned 8-bit integer.
Platform independent unsigned 16-bit integer.
Platform independent unsigned 32-bit integer.
Platform dependent unsigned integer. Has width of controller's data bus.
Counting semaphore type.
typedef OST_UINT8 OST_CSEM;
This type is available only when the OS_ENABLE_CSEM constant is defined in OSAcfg.h.
You can redefine this type by changing the size of CSEM in file OSAcfg.h:
#define OS_CSEM_SIZE 4
Allowed values of OS_CSEM_SIZE:
1 | OST_UINT8 (0..2^8-1) |
2 | OST_UINT16 (0..2^16-1) |
4 | OST_UINT32 (0..2^32-1) |
Bit fields.
typedef OST_UINT8 OST_FLAG; typedef OST_UINT16 OST_FLAG16; typedef OST_UINT32 OST_FLAG32;
Pointer to message.
typedef void * OST_MSG;
You can redefine this type by defining the OS_MSG_TYPE constant in OSAcfg.h. For example:
typedef stuct { char * Name; char Age; } MyType; #define OS_MSG_TYPE MyType *
Allowed: all types (for example const char * - pointer to ROM).
Descriptor of pointer to message. Contains pointer to message and message's state flag (free/busy).
typedef struct { char status; // Message's state flag (=0 - free, =1 - busy) OST_MSG msg; // Pointer to message body } OST_MSG_CB;
Dynamic timer.
typedef struct { OST_DTIMER_FLAGS Flags; void * Next; _OST_DTIMER Timer; // Timer's counter } OST_DTIMER;
State flags are used to tell the timer routine (OS_Timer) how to handle this timer (is it running or stopped, is it active, is there a subsequent timer in the list):
Flags | Timer's state flags (see OST_DTIMER_FLAGS) |
Next | Pointer to next timer in list of active timers |
Timer | Counter. Size of counter is set by OS_DTIMER_SIZE constant (default = 2) |
You can only redefine the counter's size constant OS_DTIMER_SIZE in OSAcfg.h:
#define OS_DTIMER_SIZE 4
Allowed values of OS_DTIMER_SIZE:
1 | OST_UINT8 (0..2^8-1) |
2 | OST_UINT16 (0..2^16-1) |
4 | OST_UINT32 (0..2^32-1) |
Timer in queue of timers.
typedef struct { OST_QTIMER_FLAGS Flags; void * Next; _OST_QTIMER Timer; // Timer's counter } OST_QTIMER;
State flags are used to tell the timer routine (OS_Timer) how to handle this timer (is it running or stopped, is it active, is there a subsequent timer in the list):
Flags | Timer's state flags (see OST_QTIMER_FLAGS) |
Next | Pointer to next timer in list of active timers |
Timer | Counter. Size of counter is set by OS_QTIMER_SIZE constant (default = 2) |
You can only redefine the counter's size constant OS_QTIMER_SIZE in OSAcfg.h:
#define OS_QTIMER_SIZE 4
Allowed values of OS_QTIMER_SIZE:
1 | OST_UINT8 (0..2^8-1) |
2 | OST_UINT16 (0..2^16-1) |
4 | OST_UINT32 (0..2^32-1) |
Queue of pointers to messages.
typedef struct { OST_QUEUE_CONTROL Q; OST_MSG *pMsg; } OST_QUEUE;
Q - queue control block.
pMsg - pointer to buffer where pointers to message will be stored.
Queue of simple messages.
typedef struct { OST_QUEUE_CONTROL Q; OST_SMSG *pSMsg; } OST_SQUEUE;
Q - queue control block.
pSMsg - pointer to buffer where simple message will be stored.
Simple byte message. Used to reduce RAM usage when there is no need to use pointers to messages.
typedef OST_UINT8 OST_SMSG;
You can redefine this type by defining the OS_SMSG_TYPE constant in OSAcfg.h. For example:
#define OS_SMSG_TYPE unsigned long
Allowed: any counting type. You should bear in mind that the simple message type does not have a separate flag indicating the busy state. This state is indicated by the message's body: if the simple message is zero, then it is free, otherwise it is busy. Thus you may exchange only non-zero simple messages between tasks.
Variables of this type are used to control tasks from anywhere in the program. Task descriptors are not accessible directly, so these variables are used to access task descriptors via pointers.
typedef OS_TASKS_BANK OST_TCB * OST_TASK_POINTER;
Note that prefix OS_TASKS_BANK is used.
Type of dynamic timer's counter.
#if OS_DTIMER_SIZE == 1 #define _OST_DTIMER OST_UINT8 #elif OS_DTIMER_SIZE == 2 #define _OST_DTIMER OST_UINT16 #elif OS_DTIMER_SIZE == 4 #define _OST_DTIMER OST_UINT32 #endif
If the constant OS_DTIMER_SIZE is not defined, then type is set to default value OS_TIMER_SIZE.
Type of static timer's counter.
#if OS_STIMER_SIZE == 1 #define _OST_STIMER OST_UINT8 #elif OS_STIMER_SIZE == 2 #define _OST_STIMER OST_UINT16 #elif OS_STIMER_SIZE == 4 #define _OST_STIMER OST_UINT32 #endif
If the constant OS_STIMER_SIZE is not defined, then type is set to default value OS_TIMER_SIZE.
Type of task timer's counter.
#if OS_TTIMER_SIZE == 1 #define _OST_TTIMER OST_UINT8 #elif OS_TTIMER_SIZE == 2 #define _OST_TTIMER OST_UINT16 #elif OS_TTIMER_SIZE == 4 #define _OST_TTIMER OST_UINT32 #endif
If the constant OS_TTIMER_SIZE is not defined, then type is set to default value OS_TIMER_SIZE.
Type of queue timer's counter.
#if OS_QTIMER_SIZE == 1 #define _OST_QTIMER OST_UINT8 #elif OS_QTIMER_SIZE == 2 #define _OST_QTIMER OST_UINT16 #elif OS_QTIMER_SIZE == 4 #define _OST_QTIMER OST_UINT32 #endif
If the constant OS_QTIMER_SIZE is not defined, then type is set to default value OS_TIMER_SIZE.