Ignore:
Timestamp:
Oct 23, 2016, 8:29:46 PM (8 years ago)
Author:
ertl-honda
Message:

マクロ名を更新.
実行モデルを変更.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • rtos_arduino/trunk/examples/CompositeExample/r2ca_app.cpp

    r255 r260  
    1 #include "rca.h"
     1#include "r2ca.h"
    22#include "i2c_lcd.h"
    33
     
    3636";
    3737
     38extern void task1_setup();
     39extern void task2_setup();
     40extern void task3_setup();
     41extern void task4_setup();
     42extern void task5_setup();
     43
    3844void setup(){
    3945    Serial.begin(115200);   
     
    4349    Serial.println("Main Task : setup start!");
    4450    Serial.println(usage);
     51
     52    task1_setup();
     53    task2_setup();
     54    task3_setup();
     55    task4_setup();
     56    task5_setup();
    4557}
    4658
     
    5971#define SVC_PERROR(expr)        svc_perror(__FILE__, __LINE__, #expr, (expr))
    6072
    61 ID              tskid = RCA_TASK1;
     73ID              tskid = R2CA_TASK1;
    6274int_t   tskno = 1;
    6375
     
    7789        case '1':
    7890            tskno = 1;
    79             tskid = RCA_TASK1;
     91            tskid = R2CA_TASK1;
    8092            syslog(LOG_INFO, "Select Sensor Task.");
    8193            break;
    8294        case '2':
    8395            tskno = 2;
    84             tskid = RCA_TASK2;
     96            tskid = R2CA_TASK2;
    8597            syslog(LOG_INFO, "Select Web Task.");
    8698            break;
    8799        case '3':
    88100            tskno = 3;
    89             tskid = RCA_TASK3;
     101            tskid = R2CA_TASK3;
    90102            syslog(LOG_INFO, "Select LED Task.");
    91103            break;
    92104        case '4':
    93105            tskno = 4;
    94             tskid = RCA_TASK4;
     106            tskid = R2CA_TASK4;
    95107            syslog(LOG_INFO, "Select TFT Task.");
    96108            break;
    97109        case '5':
    98110            tskno = 5;
    99             tskid = RCA_TASK5;
     111            tskid = R2CA_TASK5;
    100112            syslog(LOG_INFO, "Select Processing Task.");
    101113            break;
     
    346358}
    347359
    348 void task1_loop() {
     360void loop1() {
    349361    static uint32_t sensor_cyc_tim = 0;
    350362
     
    554566
    555567
    556 void task2_loop()
     568void loop2()
    557569{
    558570    uint8_t buffer[128] = {0};
     
    622634}
    623635
    624 void task3_loop() {
     636void loop3() {
    625637    static bool gled1_blink_state = false;
    626638    static bool gled2_blink_state = false;
     
    772784int loop_cnt = 0;;
    773785
    774 void task4_loop() {   
     786void loop4() {   
    775787  // don't do anything if the image wasn't loaded correctly.
    776788  if (logo.isValid() == false) {
     
    833845#define TIMEOUT_MS  3000
    834846
    835 void task5_loop()
     847void loop5()
    836848{
    837849    if(!processing_connected){
     
    848860    uint16_t dispatch_cnt;
    849861
    850     load = 100 - map(rca_idle_result, 0, IDLE_TASK_IDLE_LOOP_10MS/10, 0, 100);
    851     isr_cnt = (rca_isr_result > 0xffff)? 0xffff : rca_isr_result;
    852     dispatch_cnt = (rca_dispatch_result > 0xffff)? 0xffff : rca_dispatch_result;
     862    load = 100 - map(r2ca_idle_result, 0, IDLE_TASK_IDLE_LOOP_10MS/10, 0, 100);
     863    isr_cnt = (r2ca_isr_result > 0xffff)? 0xffff : r2ca_isr_result;
     864    dispatch_cnt = (r2ca_dispatch_result > 0xffff)? 0xffff : r2ca_dispatch_result;
    853865   
    854866    if (PSERIAL.available()){
Note: See TracChangeset for help on using the changeset viewer.