X-Git-Url: https://git.realraum.at/?p=svn42.git;a=blobdiff_plain;f=old-door-deamon%2Flibparportled-0.5.1%2Fled-example.c;fp=old-door-deamon%2Flibparportled-0.5.1%2Fled-example.c;h=0000000000000000000000000000000000000000;hp=ea3fc2ba4863444284fa5e1aea479d6a8fdd7e28;hb=ef0255ffe0a390c49c6e2c3e41fb5312032a4f00;hpb=5f90a9da59975c3bf81efc461fcd13637e4e0e5d diff --git a/old-door-deamon/libparportled-0.5.1/led-example.c b/old-door-deamon/libparportled-0.5.1/led-example.c deleted file mode 100644 index ea3fc2b..0000000 --- a/old-door-deamon/libparportled-0.5.1/led-example.c +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2002,2003 Julien Danjou - * - * This is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2, or (at your option) any - * later version. - * - * This is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - */ - -#include -#include -#include - -#include - -/* Some code examples */ - -int led_on_right_to_left(int total_time) -{ - int i; - for(i=1;i <= MAXLED;i++) - { - led_on(i); - usleep(total_time/MAXLED); - led_off(i); - } -} - -int led_on_left_to_right(int total_time) -{ - int i; - for(i=MAXLED;i > 0;i--) - { - led_on(i); - usleep(total_time/MAXLED); - led_off(i); - } -} - -int led_on_center_to_border(int pause_time) -{ - int i; - for(i=MAXLED/2;i>=0;i--){ - led_on(i); - led_on(MAXLED-i+1); - usleep(pause_time); - if(i!=MAXLED/2) led_off(i+1); - if(i!=MAXLED/2) led_off(MAXLED-i); - usleep(pause_time); - } -} - - -int main() -{ - /* led_setperm(); - led_on_center_to_border(100000); - - led_on_right_to_left(50000); - led_on_left_to_right(50000); - - led_blink_on(4, 100000); - led_blink_on(5, 100000); - sleep(2); - led_blink_off(5); - sleep(1); - led_blink_off(4); - sleep(5); - led_on(1); - */ - - led_setperm(); - while(1) { - - led_on_right_to_left(100000); - led_on_left_to_right(100000); - - } - - exit(); -} -