Ejemplo n.º 1
0
void sys_sig_rfainit(ot_int pcode) {
/// This is a static callback.   The kernel uses it when it is starting up a 
/// radio process.  It is used here to turn-on activity LEDs.

    // Assume that (1 <= code1 <= 5), which is the case in normal operation
    if (pcode < 3)  otapi_led2_on();
    else            otapi_led1_on();
}
Ejemplo n.º 2
0
/** User Applet and Button Management Routines <BR>
  * ===========================================================================<BR>
  * The User applet is primarily activated by callbacks from the kernel.  However,
  * in this system some features are also activated by button presses.
  *
  */
void sub_led_cycle(ot_u8 i) {
    switch (i & 3) {
        case 0: PALFI_LED4_ON();        break;
        case 1: PALFI_LED3_ON();        break;
        case 2: otapi_led2_on();   		break;
        case 3: otapi_led1_on();   		break;
    }

    platform_swdelay_ms(33);

    switch (i & 3) {
        case 0: PALFI_LED4_OFF();       break;
        case 1: PALFI_LED3_OFF();       break;
        case 2: otapi_led2_off();       break;
        case 3: otapi_led1_off();       break;
    }
}
Ejemplo n.º 3
0
/** Application Main <BR>
  * ==================================================================<BR>
  *
  */
void app_init() {
/// 1. Blink the board LEDs to show that it is starting up.  
/// 2. Configure the board input button, which for this app will send a ping
    ot_u8 i;

    i=4;
    while (i != 0) {
        if (i&1)    otapi_led1_on();
        else        otapi_led2_on();

        platform_swdelay_ms(30);
        otapi_led2_off();
        otapi_led1_off();
        i--;
    }
    
    //App Task parameters that stay the same throughout the runtime
    sys_task_setreserve(APP_TASK, 1);
    sys_task_setlatency(APP_TASK, 10);
}
Ejemplo n.º 4
0
/** Application Main <BR>
  * ==================================================================<BR>
  *
  */
void app_init() {
/// 1. Blink the board LEDs to show that it is starting up.  
/// 2. Configure the board input button, which for this app will send a ping
    ot_u8 i;

    i=4;
    while (i != 0) {
        if (i&1)    otapi_led1_on();
        else        otapi_led2_on();

        platform_swdelay_ms(30);
        otapi_led2_off();
        otapi_led1_off();
        i--;
    }

    sub_button_init();
    
    //If you have a chronometer applet, you can initialize it here.
    //The commented function below is for example purposes.
    //chron_init(TIM0A5);
}
Ejemplo n.º 5
0
/** Application Main <BR>
  * ==================================================================<BR>
  *
  */
void app_init() {
#if defined(BOARD_eZ430Chronos)
/// Setup LCD


#else
/// 1. Blink the board LEDs to show that it is starting up.
/// 2. Configure the board input button, which for this app will send a ping
    ot_u8 i;

    i=4;
    while (i != 0) {
        if (i&1)    otapi_led1_on();
        else        otapi_led2_on();

        platform_swdelay_ms(30);
        otapi_led2_off();
        otapi_led1_off();
        i--;
    }
#endif

    sub_button_init();
}