int main(void) { rflpc_eth_init () ; rflpc_led_init () ; rflpc_eth_irq_enable_set (~0) ; rflpc_eth_irq_enable (~0) ; rflpc_eth_irq_trigger(~0); rflpc_irq_handler_t led = pinpon ; rflpc_eth_set_irq_handler (led) ; /* rflpc_rit_enable() ; rflpc_irq_handler_t check_led = pinpon ; rflpc_rit_set_callback(period, ~period, 1, check_led) ; */ while (1) { } return 0 ; }
int main() { int j,i = 0; rflpc_led_init(); rflpc_led_set(RFLPC_LED_1); for (j = 0 ; j < 10000000 ; ++j); rflpc_led_set(RFLPC_LED_2); for (j = 0 ; j < 10000000 ; ++j); rflpc_led_set(RFLPC_LED_3); for (j = 0 ; j < 10000000 ; ++j); rflpc_led_set(RFLPC_LED_4); for (j = 0 ; j < 10000000 ; ++j); rflpc_led_clr(RFLPC_LED_1); for (j = 0 ; j < 10000000 ; ++j); rflpc_led_clr(RFLPC_LED_2); for (j = 0 ; j < 10000000 ; ++j); rflpc_led_clr(RFLPC_LED_3); for (j = 0 ; j < 10000000 ; ++j); rflpc_led_clr(RFLPC_LED_4); while (1) { rflpc_led_binary_value((i++)%16); for (j = 0 ; j < 1000000 ; ++j); } return 0; }
static char init(void) { rflpc_pin_set(MBED_DIP12, 0, RFLPC_PIN_MODE_RESISTOR_PULL_DOWN, 0); rflpc_pin_set(MBED_DIP13, 0, RFLPC_PIN_MODE_RESISTOR_PULL_DOWN, 0); rflpc_pin_set(MBED_DIP14, 0, RFLPC_PIN_MODE_RESISTOR_PULL_DOWN, 0); rflpc_pin_set(MBED_DIP15, 0, RFLPC_PIN_MODE_RESISTOR_PULL_DOWN, 0); rflpc_pin_set(MBED_DIP16, 0, RFLPC_PIN_MODE_RESISTOR_PULL_DOWN, 0); rflpc_led_init(); return set_timer(&timer,100); }
int main() { rflpc_eth_init(); rflpc_led_init(); rflpc_irq_init (); rflpc_eth_irq_enable_set(0x30ff); rflpc_eth_set_irq_handler(enableled); rflpc_eth_irq_trigger(1); while(1); return 0; }
int main() { rflpc_eth_init(); rflpc_led_init(); while(1){ if(rflpc_eth_link_state()){ rflpc_led_set(RFLPC_LED_1); } else{ rflpc_led_clr(RFLPC_LED_1); } } return 0; }
static char do_led(struct args_t *args) { rflpc_led_init(); if(args) { int rep = (int) args->on; if(rep) { rflpc_led_set(RFLPC_LED_1); } else { rflpc_led_clr(RFLPC_LED_1); } } return 1; }
/* simple contents generator */ static char doGet(struct args_t *args) { rflpc_led_init(); if(args->led == 1){ rflpc_led_set(RFLPC_LED_1); } if(args->led == 2){ rflpc_led_set(RFLPC_LED_2); } if(args->led == 3){ rflpc_led_set(RFLPC_LED_3); } if(args->led == 4){ rflpc_led_set(RFLPC_LED_4); } return 1; }