예제 #1
0
파일: main.c 프로젝트: armint/OpenTag
/** 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;
    }
}
예제 #2
0
파일: main.c 프로젝트: jpnorair/OpenTag
/** 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) {
	i &= 3;
	switch (i) {
	case 0: PALFI_LED4_ON();	break;
	case 1: PALFI_LED3_ON();	break;
	case 2: BOARD_led2_on();	break;
	case 3: BOARD_led1_on();	break;
	}

    delay_ms(33);

    switch (i) {
    case 0: PALFI_LED4_OFF();	break;
    case 1: PALFI_LED3_OFF();	break;
    case 2: BOARD_led2_off();	break;
    case 3: BOARD_led1_off();	break;
    }
}