/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Arduino.h"
#include "drawer.h"


void Drawer::draw_reset()
{
}


void Drawer::led_on( int led, bool on )
{
	if( led < 0 || led > 9 ) return;

	// convert to pin no.
	led += 4;

	// pin 4 needs to be inverted (it's driving a PNP)
	if( led == 4 ) on = !on;

	digitalWrite( led, on? HIGH : LOW );
}