Everything

CHAPTER 15 DATA TYPES AND MACROS


This chapter describes the data types, data structures and macros, which are used when issuing service calls provided by the RI850V4.
The definition of the macro and data structures is performed by each header file stored in <ri_root>\include\os.
Note <ri_root> indicates the installation folder of RI850V4.
The default folder is "C:\Program Files\Renesas Electronics\CS+\CC\RI850V4RH.
15.1 Data Types
The Following lists the data types of parameters specified when issuing a service call.
Macro definition of the data type is performed by the header file <ri_root>\include\os\types.h, which is called from the standard header file <ri_root>\include\kernel.h and the ITRON general definition header file <ri_root>\include\os\itron.h.
Table 15-1 Data Types
Macro
Data Type
Description
B
signed char
Signed 8-bit integer
H
signed short
Signed 16-bit integer
W
signed long
Signed 32-bit integer
UB
unsigned char
Unsigned 8-bit integer
UH
unsigned short
Unsigned 16-bit integer
UW
unsigned long
Unsigned 32-bit integer
VB
signed char
8-bit value with unknown data type
VH
signed short
16-bit value with unknown data type
VW
signed long
32-bit value with unknown data type
VP
void *
Pointer to unknown data type
FP
void (*)
Processing unit start address (pointer to a function)
INT
signed int
Signed 32-bit integer
UINT
unsigned int
Unsigned 32-bit integer
BOOL
signed long
Boolean value (TRUE or FALSE)
FN
signed short
Function code
ER
signed long
Error code
ID
signed short
Object ID number
ATR
unsigned short
Object attribute
STAT
unsigned short
Object state
MODE
unsigned short
Service call operational mode
PRI
signed short
Priority
SIZE
unsigned long
Memory area size (in bytes)
TMO
signed long
Timeout (unit:millisecond)
RELTIM
unsigned long
Relative time (unit:millisecond)
VP_INT
signed int
Pointer to unknown data type, or signed 32-bit integer
ER_BOOL
signed long
Error code, or boolean value (TRUE or FALSE)
ER_ID
signed long
Error code, or object ID number
ER_UINT
signed int
Error code, or signed 32-bit integer
FLGPTN
unsigned int
Bit pattern
INTNO
unsigned short
Exception code

15.2 Packet Formats
This section explains the data structures (task state packet, semaphore state packet, or the like) used when issuing a service call provided by the RI850V4.
Be sure not to refer from programs to the areas reserved for future use in each data structure.
15.2.1 Task state packet
The following shows task state packet T_RTSK used when issuing ref_tsk or iref_tsk.
Definition of task state packet T_RTSK is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rtsk {
     STAT    tskstat;        /*Current state*/
     PRI     tskpri;         /*Current priority*/
     PRI     tskbpri;        /*Reserved for future use*/
     STAT    tskwait;        /*Reason for waiting*/
     ID      wobjid;         /*Object ID number for which the task waiting*/
     TMO     lefttmo;        /*Remaining time until timeout*/
     UINT    actcnt;         /*Activation request count*/
     UINT    wupcnt;         /*Wakeup request count*/
     UINT    suscnt;         /*Suspension count*/
     ATR     tskatr;         /*Attribute*/
     PRI     itskpri;        /*Initial priority*/
     ID      memid;          /*Reserved for future use*/
 } T_RTSK;

The following shows details on task state packet T_RTSK.
- tskstat
Stores the current state.
TTS_RUN: RUNNING state
TTS_RDY: READY state
TTS_WAI: WAITING state
TTS_SUS: SUSPENDED state
TTS_WAS: WAITING-SUSPENDED state
TTS_DMT: DORMANT state
- tskpri
Stores the current priority.
- tskbpri
System-reserved area.
- tskwait
Stores the reason for waiting.
TTW_SLP: Sleeping state
TTW_DLY: Delayed state
TTW_SEM: WAITING state for a semaphore resource
TTW_FLG: WAITING state for an eventflag
TTW_SDTQ: Sending WAITING state for a data queue
TTW_RDTQ: Receiving WAITING state for a data queue
TTW_MBX: Receiving WAITING state for a mailbox
TTW_MTX: WAITING state for a mutex
TTW_MPF: WAITING state for a fixed-sized memory block
TTW_MPL: WAITING state for a variable-sized memory block
- wobjid
Stores the object ID number for which the task waiting.
When the task is not in the WAITING state, 0 is stored.
- lefttmo
Stores the remaining time until timeout (unit:millisecond).
- actcnt
Stores the activation request count.
- wupcnt
Stores the wakeup request count.
- suscnt
Stores the suspension count.
- tskatr
Stores the attribute (coding language, initial activation state, etc.).
Coding language (bit 0)
TA_HLNG: Start a task through a C language interface.
TA_ASM: Start a task through an assembly language interface.
Initial activation state (bit 1)
TA_ACT: Task is activated after the creation.
Initial preemption state (bit 14)
TA_DISPREEMPT: Preemption is disabled at task activation.
Initial interrupt state (bit 15)
TA_ENAINT: Acceptance of EI level maskable interrupts (from the Maximum interrupt priority: maxintpri to the minimum interrupt priority) is enabled.
TA_DISINT: Acceptance of EI level maskable interrupts (from the Maximum interrupt priority: maxintpri to the minimum interrupt priority) is disabled.
[Structure of tskatr]
- itskpri
Stores the initial priority.
- memid
System-reserved area.
15.2.2 Task state packet (simplified version)
The following shows task state packet (simplified version) T_RTST used when issuing ref_tst or iref_tst.
Definition of task state packet (simplified version) T_RTST is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rtst {
     STAT    tskstat;        /*Current state*/
     STAT    tskwait;        /*Reason for waiting*/
 } T_RTST;

The following shows details on task state packet (simplified version) T_RTST.
- tskstat
Stores the current state.
TTS_RUN: RUNNING state
TTS_RDY: READY state
TTS_WAI: WAITING state
TTS_SUS: SUSPENDED state
TTS_WAS: WAITING-SUSPENDED state
TTS_DMT: DORMANT state
- tskwait
Stores the reason for waiting.
TTW_SLP: Sleeping state
TTW_DLY: Delayed state
TTW_SEM: WAITING state for a semaphore resource
TTW_FLG: WAITING state for an eventflag
TTW_SDTQ: Sending WAITING state for a data queue
TTW_RDTQ: Receiving WAITING state for a data queue
TTW_MBX: Receiving WAITING state for a mailbox
TTW_MTX: WAITING state for a mutex
TTW_MPF: WAITING state for a fixed-sized memory block
TTW_MPL: WAITING state for a variable-sized memory block
15.2.3 Semaphore state packet
The following shows semaphore state packet T_RSEM used when issuing ref_sem or iref_sem.
Definition of semaphore state packet T_RSEM is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rsem {
     ID      wtskid;         /*Existence of waiting task*/
     UINT    semcnt;         /*Current resource count*/
     ATR     sematr;         /*Attribute*/
     UINT    maxsem;         /*Maximum resource count*/
 } T_RSEM;

The following shows details on semaphore state packet T_RSEM.
- wtskid
Stores whether a task is queued to the semaphore wait queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- semcnt
Stores the current resource count.
- sematr
Stores the attribute (queuing method).
Task queuing method (bit 0)
TA_TFIFO: Task wait queue is in FIFO order.
TA_TPRI: Task wait queue is in task priority order.
[Structure of sematr]
- maxsem
Stores the maximum resource count.
15.2.4 Eventflag state packet
The following shows eventflag state packet T_RFLG used when issuing ref_flg or iref_flg.
Definition of eventflag state packet T_RFLG is performed by the header file <ri_root>\include\os\packet.h, which is called the from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rflg {
     ID      wtskid;         /*Existence of waiting task*/
     FLGPTN  flgptn;         /*Current bit pattern*/
     ATR     flgatr;         /*Attribute*/
 } T_RFLG;

The following shows details on eventflag state packet T_RFLG.
- wtskid
Stores whether a task is queued to the event flag wait queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- flgptn
Stores the Current bit pattern.
- flgatr
Stores the attribute (queuing method, queuing count, etc.).
Task queuing method (bit 0)
TA_TFIFO: Task wait queue is in FIFO order.
TA_TPRI: Task wait queue is in task priority order.
Queuing count (bit 1)
TA_WSGL: Only one task is allowed to be in the WAITING state for the eventflag.
TA_WMUL: Multiple tasks are allowed to be in the WAITING state for the eventflag.
Bit pattern clear (bit 2)
TA_CLR: Bit pattern is cleared when a task is released from the WAITING state for eventflag.
[Structure of flgatr]
15.2.5 Data queue state packet
The following shows data queue state packet T_RDTQ used when issuing ref_dtq or iref_dtq.
Definition of data queue state packet T_RDTQ is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rdtq {
     ID      stskid;         /*Existence of tasks waiting for data transmission*/
     ID      rtskid;         /*Existence of tasks waiting for data reception*/
     UINT    sdtqcnt;        /*number of data elements in the data queue*/
     ATR     dtqatr;         /*Attribute*/
     UINT    dtqcnt;         /*Data count*/
     ID      memid;          /*Reserved for future use*/
 } T_RDTQ;

The following shows details on data queue state packet T_RDTQ.
- stskid
Stores whether a task is queued to the transmission wait queue of the data queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- rtskid
Stores whether a task is queued to the reception wait queue of the data queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- sdtqcnt
Stores the number of data elements in data queue.
- dtqatr
Stores the attribute (queuing method).
Task queuing method (bit 0)
TA_TFIFO: Task wait queue is in FIFO order.
TA_TPRI: Task wait queue is in task priority order.
[Structure of dtqatr]
- dtqcnt
Stores the data count.
- memid
System-reserved area.
15.2.6 Message packet
The following shows message packet T_MSG/T_MSG_PRI used when issuing snd_mbx, isnd_mbx, rcv_mbx, prcv_mbx, iprcv_mbx or trcv_mbx.
Definition of message packet T_MSG/T_MSG_PRI is performed by the header file <ri_root>\include\os\types.h, which is called from the standard header file <ri_root>\include\kernel.h and the ITRON general definition header file <ri_root>\include\itron.h.
[Message packet for TA_MFIFO attribute ]
 typedef struct  t_msg {
     struct  t_msg   *msgnext;   /*Reserved for future use*/
 } T_MSG;

[Message packet for TA_MPRI attribute]
 typedef struct  t_msg_pri {
     struct  t_msg   msgque;     /*Reserved for future use*/
     PRI     msgpri;             /*Message priority*/
 } T_MSG_PRI;

The following shows details on message packet T_RTSK/T_MSG_PRI.
- msgnext, msgque
System-reserved area.
- msgpri
Stores the message priority.
Note 1 In the RI850V4, a message having a smaller priority number is given a higher priority.
Note 2 Values that can be specified as the message priority level are limited to the range defined in Mailbox information (Maximum message priority: maxmpri) when the system configuration file is created.
15.2.7 Mailbox state packet
The following shows mailbox state packet T_RMBX used when issuing ref_mbx or iref_mbx.
Definition of mailbox state packet T_RMBX is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rmbx {
     ID      wtskid;         /*Existence of waiting task*/
     T_MSG   *pk_msg;        /*Existence of waiting message*/
     ATR     mbxatr;         /*Attribute*/
 } T_RMBX;

The following shows details on mailbox state packet T_RMBX.
- wtskid
Stores whether a task is queued to the mailbox wait queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- pk_msg
Stores whether a message is queued to the mailbox wait queue.
NULL: No applicable message
Value: Start address of the message packet at the head of the wait queue
- mbxatr
Stores the attribute (queuing method).
Task queuing method (bit 0)
TA_TFIFO: Task wait queue is in FIFO order.
TA_TPRI: Task wait queue is in task priority order.
Message queuing method (bit 1)
TA_MFIFO: Message wait queue is in FIFO order.
TA_MPRI: Message wait queue is in message priority order.
[Structure of mbxatr]
15.2.8 Mutex state packet
The following shows mutex state packet T_RMTX used when issuing ref_mtx or iref_mtx.
Definition of mutex state packet T_RMTX is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rmtx {
     ID      htskid;         /*Existence of locked mutex*/
     ID      wtskid;         /*Existence of waiting task*/
     ATR     mtxatr;         /*Attribute*/
     PRI     ceilpri;        /*Reserved for future use*/
 } T_RMTX;

The following shows details on mutex state packet T_RMTX.
- htskid
Stores whether a task that is locking a mutex exists.
TSK_NONE: No applicable task
Value: ID number of the task locking the mutex
- wtskid
Stores whether a task is queued to the mutex wait queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- mtxatr
Stores the attribute (queuing method).
Task queuing method (bit 0 to 1)
TA_TFIFO: Task wait queue is in FIFO order.
TA_TPRI: Task wait queue is in task priority order.
[Structure of mtxatr]
- ceilpri
System-reserved area.
15.2.9 Fixed-sized memory pool state packet
The following shows fixed-sized memory pool state packet T_RMPF used when issuing ref_mpf or iref_mpf.
Definition of fixed-sized memory pool state packet T_RMPF is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rmpf {
     ID      wtskid;         /*Existence of waiting task*/
     UINT    fblkcnt;        /*Number of free memory blocks*/
     ATR     mpfatr;         /*Attribute*/
     ID      memid;          /*Reserved for future use*/
 } T_RMPF;

The following shows details on fixed-sized memory pool state packet T_RMPF.
- wtskid
Stores whether a task is queued to the fixed-size memory pool.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- fblkcnt
Stores the number of free memory blocks.
- mpfatr
Stores the attribute (queuing method).
Task queuing method (bit 0)
TA_TFIFO: Task wait queue is in FIFO order.
TA_TPRI: Task wait queue is in task priority order.
[Structure of mpfatr]
- memid
System-reserved area.
15.2.10 Variable-sized memory pool state packet
The following shows variable-sized memory pool state packet T_RMPL used when issuing ref_mpl or iref_mpl.
Definition of variable-sized memory pool state packet T_RMPL is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rmpl {
     ID      wtskid;         /*Existence of waiting task*/
     SIZE    fmplsz;         /*Total size of free memory blocks*/
     UINT    fblksz;         /*Maximum memory block size available*/
     ATR     mplatr;         /*Attribute*/
     ID      memid;          /*Reserved for future use*/
 } T_RMPL;

The following shows details on variable-sized memory pool state packet T_RMPL.
- wtskid
Stores whether a task is queued to the variable-size memory pool wait queue.
TSK_NONE: No applicable task
Value: ID number of the task at the head of the wait queue
- fmplsz
Stores the total size of free memory blocks (in bytes).
- fblksz
Stores the maximum memory block size available (in bytes).
- mplatr
Stores the attribute (queuing method).
Task queuing method (bit 0)
TA_TFIFO: Task wait queue is in FIFO order.
TA_TPRI: Task wait queue is in task priority order.
[Structure of mplatr]
- memid
System-reserved area.
15.2.11 System time packet
The following shows system time packet SYSTIM used when issuing set_tim, iset_tim, get_tim or iget_tim.
Definition of system time packet SYSTIM is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_systim {
     UW      ltime;          /*System time (lower 32 bits)*/
     UH      utime;          /*System time (higher 16 bits)*/
 } SYSTIM;

The following shows details on system time packet SYSTIM.
- ltime
Stores the system time (lower 32 bits).
- utime
Stores the system time (higher 16 bits).
15.2.12 Cyclic handler state packet
The following shows cyclic handler state packet T_RCYC used when issuing ref_cyc or iref_cyc.
Definition of cyclic handler state packet T_RCYC is performed by the header file <ri_root>\include\os\packet.h, which is called from the standard header file <ri_root>\include\kernel.h.
 typedef struct  t_rcyc {
     STAT    cycstat;        /*Current state*/
     RELTIM  lefttim;        /*Time left before the next activation*/
     ATR     cycatr;         /*Attribute*/
     RELTIM  cyctim;         /*Activation cycle*/
     RELTIM  cycphs;         /*Activation phase*/
 } T_RCYC;

The following shows details on cyclic handler state packet T_RCYC.
- cycstat
Store the current state.
TCYC_STP: Non-operational state
TCYC_STA: Operational state
- lefttim
Stores the time left before the next activation (unit:millisecond).
- cycatr
Stores the attribute (coding language, initial activation state, etc.).
Coding language (bit 0)
TA_HLNG: Start a cyclic handler through a C language interface.
TA_ASM: Start a cyclic handler through an assembly language interface.
Initial activation state (bit 1)
TA_STA: Cyclic handlers is in an operational state after the creation.
Existence of saved activation phases (bit 2)
TA_PHS: Cyclic handler is activated preserving the activation phase.
[Structure of cycatr]
- cyctim
Stores the activation cycle (unit:millisecond).
- cycphs
Stores the activation phase (unit:millisecond).
In the RI850V4, the initial activation phase means the relative interval from when generation of s cyclic handler is completed until the first activation request is issued.
15.3 Data Macros
This section explains the data macros (for current state, processing program attributes, or the like) used when issuing a service call provided by the RI850V4.
15.3.1 Current state
The following lists the management object current states acquired by issuing service calls (ref_tsk, ref_sem, or the like).
Macro definition of the current state is performed by the header file <ri_root>\include\os\option.h, which is called from standard the header file <ri_root>\include\kernel.h and the ITRON general definition header file <ri_root>\include\itron.h.
Table 15-2 Current State
Macro
Value
Description
TTS_RUN
0x01
RUNNING state
TTS_RDY
0x02
READY state
TTS_WAI
0x04
WAITING state
TTS_SUS
0x08
SUSPENDED state
TTS_WAS
0x0c
WAITING-SUSPENDED state
TTS_DMT
0x10
DORMANT state
TCYC_STP
0x00
Non-operational state
TCYC_STA
0x01
Operational state
TTW_SLP
0x0001
Sleeping state
TTW_DLY
0x0002
Delayed state
TTW_SEM
0x0004
WAITING state for a semaphore resource
TTW_FLG
0x0008
WAITING state for an eventflag
TTW_SDTQ
0x0010
Sending WAITING state for a data queue
TTW_RDTQ
0x0020
Receiving WAITING state for a data queue
TTW_MBX
0x0040
Receiving WAITING state for a mailbox
TTW_MTX
0x0080
WAITING state for a mutex
TTW_MPF
0x2000
WAITING state for a fixed-sized memory pool
TTW_MPL
0x4000
WAITING state for a variable-sized memory pool
TSK_NONE
0
No applicable task

15.3.2 Processing program attributes
The following lists the processing program attributes acquired by issuing service calls (ref_tsk, ref_cyc, or the like).
Macro definition of attributes is performed by the header file<ri_root>\include\os\option.h, which is called from the standard header file <ri_root>\include\kernel.h and the ITRON general definition header file <ri_root>\include\itron.h.
Table 15-3 Processing Program Attributes
Macro
Value
Description
TA_HLNG
0x0000
Start a processing unit through a C language interface.
TA_ASM
0x0001
Start a processing unit through an assembly language interface.
TA_ACT
0x0002
Task is activated after the creation.
TA_DISPREEMPT
0x4000
Preemption is disabled at task activation.
TA_ENAINT
0x0000
All interrupts are enabled at task activation.
TA_DISINT
0x8000
All interrupts are disabled at task activation.
TA_STA
0x0002
Cyclic handlers is in an operational state after the creation.
TA_PHS
0x0004
Cyclic handler is activated preserving the activation phase.

15.3.3 Management object attributes
The following lists the management object attributes acquired by issuing service calls (ref_sem, ref_flg, or the like).
Macro definition of attributes is performed by the standard header file <ri_root>\include\kernel.h, which is called from the header file<ri_root>\include\os\option.h and the ITRON general definition header file <ri_root>\include\itron.h.
Table 15-4 Management Object Attributes
Macro
Value
Description
TA_TFIFO
0x0000
Task wait queue is in FIFO order.
TA_TPRI
0x0001
Task wait queue is in task priority order.
TA_WSGL
0x0000
Only one task is allowed to be in the WAITING state for the eventflag.
TA_WMUL
0x0002
Multiple tasks are allowed to be in the WAITING state for the eventflag.
TA_CLR
0x0004
Bit pattern is cleared when a task is released from the WAITING state for eventflag.
TA_MFIFO
0x0000
Message wait queue is in FIFO order.
TA_MPRI
0x0002
Message wait queue is in message priority order.

15.3.4 Service call operating modes
The following lists the service call operating modes used when issuing service calls (act_tsk, wup_tsk, or the like).
Macro definition of operating modes is performed by the header file<ri_root>\include\os\option.h, which is called from the standard header file <ri_root>\include\kernel.h and the ITRON general definition header file <ri_root>\include\itron.h.
Table 15-5 Service Call Operating Modes
Macro
Value
Description
TSK_SELF
0
Invoking task
TPRI_INI
0
Initial priority
TMO_FEVR
-1
Waiting forever
TMO_POL
0
Polling
TWF_ANDW
0x00
AND waiting condition
TWF_ORW
0x01
OR waiting condition
TPRI_SELF
0
Current priority of the Invoking task

15.3.5 Return value
The following lists the values returned from service calls.
Macros for the return values are defined in the header file <ri_root>\include\os\error.h and option.h, which are called from the standard header file <ri_root>\include\kernel.h and the common macro definition file for ITRON specifications <ri_root>\include\itron.h.
Table 15-6 Return Value
Macro
Value
Description
E_OK
0
Normal completion
E_NOSPT
-9
Unsupported function
E_RSFN
-10
Invalid function code
E_RSATR
-11
Invalid attribute
E_PAR
-17
Parameter error
E_ID
-18
Invalid ID number
E_CTX
-25
Context error.
E_ILUSE
-28
Illegal service call use
E_NOMEM
-33
Insufficient memory
E_OBJ
-41
Object state error
E_NOEXS
-42
Non-existent object
E_QOVR
-43
Queue overflow
E_RLWAI
-49
Forced release from the WAITING state
E_TMOUT
-50
Polling failure or timeout
FALSE
0
False
TRUE
1
True

15.3.6 Kernel configuration constants
The configuration constants are listed below.
The macro definitions of the configuration constants are made in the header file <ri_root>\include\os\component.h, which is called from <ri_root>\include\itron.h. Note, however, that some numerical values with variable macro definitions are defined in the system information header file, in accordance with the settings in the system configuration file.
Table 15-7 Priority Range
Macro
Value
Description
TMIN_TPRI
1
Minimum task priority
TMAX_TPRI
variable
Maximum task priority
TMIN_MPRI
1
Minimum message priority
TMAX_MPRI
0x7fff
Maximum message priority

Table 15-8 Version Information
Macro
Value
Description
TKERNEL_MAKER
0x011b
Kernel maker code
TKERNEL_PRID
0x0000
Identification number of kernel
TKERNEL_SPVER
0x5403
Version number of the ITRON Specification
TKERNEL_PRVER
0x01xx
Version number of the kernel

Table 15-9 Maximum Queuing Count
Macro
Value
Description
TMAX_ACTCNT
127
Maximum task activation request count
TMAX_WUPCNT
127
Maximum task wakeup request count
TMAX_SUSCNT
127
Maximum suspension count

Table 15-10 Number of Bits in Bit Patterns
Macro
Value
Description
TBIT_FLGPTN
32
Number of bits in the an eventflag

Table 15-11 Base Clock Interval
Macro
Value
Description
TIC_NUME
variable
base clock interval numerator
TIC_DENO
1
base clock interval denominator

15.4 Conditional Compile Macro
The header file of the RI850V4 is conditionally compiled by the following macros.
Define macros (such as the compiler activation option -D) according to the environment used when building the source files that include the header file of the RI850V4.
Table 15-12 Conditional Compile Macros
Classification
Macro
Description
C compiler package
__rel__
CC-RH is used.
Add two underscores before and after "rel".
__ghs__
CCV850 is used.
Add two underscores before and after "ghs".
Coding language
__asm__
The assembly language is used.
Add two underscores before and after "asm".