/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: edam
  • Date: 2012-02-28 16:50:26 UTC
  • Revision ID: edam@waxworlds.org-20120228165026-pwnwo300xx2e2kg6
removed ulibc, fixed button, added text rendering

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
 
}