/** Switch Trimming Action sequence <BR> * ======================================================================== */ ot_bool palfi_action_swtrim_0(void) { PALFI_BYPASS_PORT->DOUT |= PALFI_BYPASS_PIN; PALFI_VCLD_PORT->DOUT |= PALFI_VCLD_PIN; for (palfi.channel=0; palfi.channel<3; ) { palfi.channel++; sub_prog_trimswitch(0); } PALFI_LED3_ON(); sys.evt.EXT.nextevent = 50; palfi.action = &palfi_action_swtrim_1; return False; }
/** 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; } }
/** 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; } }