turn on least significant digit
git-svn-id: svn://anubis/misc/parapin-led@51 bd8a9e45-a331-0410-811e-c64571078777
This commit is contained in:
parent
01fb393892
commit
c2075e0a66
7
led.c
7
led.c
@ -1,4 +1,5 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <parapin.h>
|
||||
|
||||
#define LED_A LP_PIN02
|
||||
@ -45,6 +46,12 @@ int main()
|
||||
|
||||
/* set up pins as output pins */
|
||||
pin_output_mode(LED_ALL);
|
||||
|
||||
if (argc == 2)
|
||||
{
|
||||
int value = atoi(argv[1]);
|
||||
turnOnDigit(2, value % 10);
|
||||
}
|
||||
}
|
||||
|
||||
void turnOnDigit(int digitPosition, int value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user