USBB17RX78K4-XXX NEC Electronics, USBB17RX78K4-XXX Datasheet - Page 80

no-image

USBB17RX78K4-XXX

Manufacturer Part Number
USBB17RX78K4-XXX
Description
78K/4 series realtime OS
Manufacturer
NEC Electronics
Datasheet
C Compiler CC78K4 of version 2.00 or above supports tasks and interrupt handlers.
Examples of describing a task and an interrupt handler in the C language are shown below.
Task
Description format
Example
Interrupt handler
Description format
Example
#pragma rtos_task [task function name]
#pragma rtos_interrupt [(interrupt request name)(interrupt handler name){stack
selection specification]
#pragma rtos_interrupt INTPO sample_h sp=int_stackò10
unsigned char int_stack[10];
extern char iset_flg(char*);
extern char flag_idl;
sample_h()
{
}
#pragma rtos_task sample
extern void slp_tsk (void);
void sample()
{
}
Remark
Remark
Remark
iset_flg(&flag_idl);
ret_int();
slp_tsk();
ext_tsk();
No external reference declaration is necessary for the “ext_tsk” system call.
External reference declaration is not necessary for system calls “ret_int” and “ret_wup”.
For details, refer to the User’s Manual of the C Compiler.
stack selection specification: sp = array name [òoffset position]
APPENDIX 2
/* Allocates stack area for interrupt */
/* External reference declaration of iset_flg */
/* External reference declaration of event flag ID */
DESCRIPTION IN C LANGUAGE
/* External reference of slp_tsk */
71

Related parts for USBB17RX78K4-XXX