Index: rtos_arduino/trunk/lib/r2ca_lib.h
===================================================================
--- rtos_arduino/trunk/lib/rca_lib.h	(revision 238)
+++ rtos_arduino/trunk/lib/r2ca_lib.h	(revision 260)
@@ -1,15 +1,15 @@
-#include "rca_app.h"
+#include "r2ca_app.h"
 
 /*
  *  Max number of task
  */
-#define RCA_NUM_TASK_MAX  5
+#define R2CA_NUM_TASK_MAX  5
 
 /*
  *  Check number of task
  */
-#if RCA_NUM_TASK > RCA_NUM_TASK_MAX
+#if R2CA_NUM_TASK > R2CA_NUM_TASK_MAX
 #error The number of Task is over!
-#endif /* RCA_NUM_TASK > RCA_NUM_TASK_MAX */
+#endif /* R2CA_NUM_TASK > R2CA_NUM_TASK_MAX */
 
 /*
@@ -25,78 +25,54 @@
  *  Priotiry
  */
-#ifndef RCA_MAINTASK_SETUP_PRI
-#define  RCA_MAINTASK_SETUP_PRI  5
-#endif /*  RCA_MAINTASK_SETUP_PRI */
+#ifndef R2CA_MAINTASK_PRI
+#define  R2CA_MAINTASK_PRI  5
+#endif /*  R2CA_MAINTASK_SETUP_PRI */
 
-#ifndef RCA_MAINTASK_LOOP_PRI
-#define  RCA_MAINTASK_LOOP_PRI  5
-#endif /*  RCA_MAINTASK_SETUP_PRI */
+#ifndef R2CA_TASK1_PRI
+#define  R2CA_TASK1_PRI  5
+#endif /*  R2CA_TASK1_SETUP_PRI */
 
-#ifndef RCA_TASK1_SETUP_PRI
-#define  RCA_TASK1_SETUP_PRI  5
-#endif /*  RCA_TASK1_SETUP_PRI */
+#ifndef R2CA_TASK2_PRI
+#define  R2CA_TASK2_PRI  5
+#endif /*  R2CA_TASK2_SETUP_PRI */
 
-#ifndef RCA_TASK1_LOOP_PRI
-#define  RCA_TASK1_LOOP_PRI  5
-#endif /*  RCA_TASK1_SETUP_PRI */
+#ifndef R2CA_TASK3_PRI
+#define  R2CA_TASK3_PRI  5
+#endif /*  R2CA_TASK3_SETUP_PRI */
 
-#ifndef RCA_TASK2_SETUP_PRI
-#define  RCA_TASK2_SETUP_PRI  5
-#endif /*  RCA_TASK2_SETUP_PRI */
+#ifndef R2CA_TASK4_PRI
+#define  R2CA_TASK4_PRI  5
+#endif /*  R2CA_TASK4_SETUP_PRI */
 
-#ifndef RCA_TASK2_LOOP_PRI
-#define  RCA_TASK2_LOOP_PRI  5
-#endif /*  RCA_TASK2_SETUP_PRI */
-
-#ifndef RCA_TASK3_SETUP_PRI
-#define  RCA_TASK3_SETUP_PRI  5
-#endif /*  RCA_TASK3_SETUP_PRI */
-
-#ifndef RCA_TASK3_LOOP_PRI
-#define  RCA_TASK3_LOOP_PRI  5
-#endif /*  RCA_TASK3_SETUP_PRI */
-
-#ifndef RCA_TASK4_SETUP_PRI
-#define  RCA_TASK4_SETUP_PRI  5
-#endif /*  RCA_TASK4_SETUP_PRI */
-
-#ifndef RCA_TASK4_LOOP_PRI
-#define  RCA_TASK4_LOOP_PRI  5
-#endif /*  RCA_TASK4_SETUP_PRI */
-
-#ifndef RCA_TASK5_SETUP_PRI
-#define  RCA_TASK5_SETUP_PRI  5
-#endif /*  RCA_TASK5_SETUP_PRI */
-
-#ifndef RCA_TASK5_LOOP_PRI
-#define  RCA_TASK5_LOOP_PRI  5
-#endif /*  RCA_TASK3_SETUP_PRI */
+#ifndef R2CA_TASK5_PRI
+#define  R2CA_TASK5_PRI  5
+#endif /*  R2CA_TASK3_SETUP_PRI */
 
 /*
  *  Stack Size
  */
-#ifndef RCA_MAINTASK_STACK_SIZE
-#define RCA_MAINTASK_STACK_SIZE 2048
-#endif  /* RCA_MAINTASK_STACK_SIZE */
+#ifndef R2CA_MAINTASK_STACK_SIZE
+#define R2CA_MAINTASK_STACK_SIZE 2048
+#endif  /* R2CA_MAINTASK_STACK_SIZE */
 
-#ifndef RCA_TASK1_STACK_SIZE
-#define RCA_TASK1_STACK_SIZE 1024
-#endif  /* RCA_TASK1_STACK_SIZE */
+#ifndef R2CA_TASK1_STACK_SIZE
+#define R2CA_TASK1_STACK_SIZE 1024
+#endif  /* R2CA_TASK1_STACK_SIZE */
 
-#ifndef RCA_TASK2_STACK_SIZE
-#define RCA_TASK2_STACK_SIZE 1024
-#endif  /* RCA_TASK2_STACK_SIZE */
+#ifndef R2CA_TASK2_STACK_SIZE
+#define R2CA_TASK2_STACK_SIZE 1024
+#endif  /* R2CA_TASK2_STACK_SIZE */
 
-#ifndef RCA_TASK3_STACK_SIZE
-#define RCA_TASK3_STACK_SIZE 1024
-#endif  /* RCA_TASK3_STACK_SIZE */
+#ifndef R2CA_TASK3_STACK_SIZE
+#define R2CA_TASK3_STACK_SIZE 1024
+#endif  /* R2CA_TASK3_STACK_SIZE */
 
-#ifndef RCA_TASK4_STACK_SIZE
-#define RCA_TASK4_STACK_SIZE 1024
-#endif  /* RCA_TASK4_STACK_SIZE */
+#ifndef R2CA_TASK4_STACK_SIZE
+#define R2CA_TASK4_STACK_SIZE 1024
+#endif  /* R2CA_TASK4_STACK_SIZE */
 
-#ifndef RCA_TASK5_STACK_SIZE
-#define RCA_TASK5_STACK_SIZE 1024
-#endif  /* RCA_TASK5_STACK_SIZE */
+#ifndef R2CA_TASK5_STACK_SIZE
+#define R2CA_TASK5_STACK_SIZE 1024
+#endif  /* R2CA_TASK5_STACK_SIZE */
 
 
@@ -104,7 +80,11 @@
  *  Round Robin Scheduling cycle
  */
-#ifndef RCA_RR_SCHEDULE_CYCLE
-#define RCA_RR_SCHEDULE_CYCLE 1
-#endif /* RCA_RR_SCHEDULE_CYCLE */
+#ifndef R2CA_RR_SCHEDULE_CYCLE
+#define R2CA_RR_SCHEDULE_CYCLE 1
+#endif /* R2CA_RR_SCHEDULE_CYCLE */
+
+#ifndef R2CA_RR_SCHEDULE_PRI
+#define R2CA_RR_SCHEDULE_PRI 0x0000
+#endif  /* R2CA_RR_SCHEDULE_PRI */
   
 #ifdef __cplusplus
@@ -112,42 +92,42 @@
 #endif
 
-extern void rca_init(intptr_t exinf);
-extern void rca_maintask(intptr_t exinf);
-extern void rca_task1(intptr_t exinf);
-extern void rca_task2(intptr_t exinf);
-extern void rca_task3(intptr_t exinf);
-extern void rca_task4(intptr_t exinf);
-extern void rca_task5(intptr_t exinf);
-extern void rca_CycHandler(intptr_t exinf);
+extern void r2ca_init(intptr_t exinf);
+extern void r2ca_maintask(intptr_t exinf);
+extern void r2ca_task1(intptr_t exinf);
+extern void r2ca_task2(intptr_t exinf);
+extern void r2ca_task3(intptr_t exinf);
+extern void r2ca_task4(intptr_t exinf);
+extern void r2ca_task5(intptr_t exinf);
+extern void r2ca_CycHandler(intptr_t exinf);
 
-extern void rca_USB_Handler(void);
-extern void rca_SERCOM0_Handler(void);
-extern void rca_SERCOM2_Handler(void);
-extern void rca_SERCOM3_Handler(void);
-extern void rca_SERCOM4_Handler(void);
-extern void rca_SERCOM5_Handler(void);
-extern void rca_EIC_Handler(void);
-extern void rca_TC5_Handler(void);
-extern void rca_RTC_Handler(void);
+extern void r2ca_USB_Handler(void);
+extern void r2ca_SERCOM0_Handler(void);
+extern void r2ca_SERCOM2_Handler(void);
+extern void r2ca_SERCOM3_Handler(void);
+extern void r2ca_SERCOM4_Handler(void);
+extern void r2ca_SERCOM5_Handler(void);
+extern void r2ca_EIC_Handler(void);
+extern void r2ca_TC5_Handler(void);
+extern void r2ca_RTC_Handler(void);
 
-#ifdef RCA_ENABLE_PROFILING
-extern void rca_idle_task(intptr_t exinf);
-extern volatile uint32_t rca_idle_result;
-extern volatile uint32_t rca_isr_result;
-extern volatile uint32_t rca_dispatch_result;
-extern volatile uint32_t rca_timer_isr_result;
-extern volatile uint32_t rca_usb_isr_result;
-extern volatile uint32_t rca_sercom0_isr_result;
-extern volatile uint32_t rca_sercom4_isr_result;
-extern volatile uint32_t rca_sercom5_isr_result;
-extern volatile uint32_t rca_eic_isr_result;
-extern volatile uint32_t rca_tc5_isr_result;
-extern volatile uint32_t rca_rtc_isr_result;
+#ifdef R2CA_ENABLE_PROFILING
+extern void r2ca_idle_task(intptr_t exinf);
+extern volatile uint32_t r2ca_idle_result;
+extern volatile uint32_t r2ca_isr_result;
+extern volatile uint32_t r2ca_dispatch_result;
+extern volatile uint32_t r2ca_timer_isr_result;
+extern volatile uint32_t r2ca_usb_isr_result;
+extern volatile uint32_t r2ca_sercom0_isr_result;
+extern volatile uint32_t r2ca_sercom4_isr_result;
+extern volatile uint32_t r2ca_sercom5_isr_result;
+extern volatile uint32_t r2ca_eic_isr_result;
+extern volatile uint32_t r2ca_tc5_isr_result;
+extern volatile uint32_t r2ca_rtc_isr_result;
 
-#ifdef RCA_USE_SERIAL3
-extern volatile uint32_t rca_sercom3_isr_result;
-#endif /* RCA_USE_SERIAL3 */
+#ifdef R2CA_USE_SERIAL3
+extern volatile uint32_t r2ca_sercom3_isr_result;
+#endif /* R2CA_USE_SERIAL3 */
   
-#endif /* RCA_ENABLE_PROFILING */
+#endif /* R2CA_ENABLE_PROFILING */
 
 #define WIRE_ENTER_CRITICAL wai_sem(WIRE_SEM);
