/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/drawer.cc

  • Committer: Tim Marston
  • Date: 2012-03-09 23:42:20 UTC
  • Revision ID: tim@ed.am-20120309234220-xr1vxzve0o5n2oss
added support for eclipse project and converted to a manual Makefile

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
void Drawer::draw_reset()
28
28
{
29
29
}
30
 
 
31
 
 
32
 
void Drawer::led_on( int led, bool on )
33
 
{
34
 
        if( led < 0 || led > 9 ) return;
35
 
 
36
 
        // convert to pin no.
37
 
        led += 4;
38
 
 
39
 
        // pin 4 needs to be inverted (it's driving a PNP)
40
 
        if( led == 4 ) on = !on;
41
 
 
42
 
        digitalWrite( led, on? HIGH : LOW );
43
 
}