/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: 2013-03-31 17:07:36 UTC
  • Revision ID: tim@ed.am-20130331170736-hphm2hg0y6l7w6z1
made rtc-test's DS1307 library a symlink to the main one in src/util

Show diffs side-by-side

added added

removed removed

1
 
#include "Arduino.h"
2
 
#include "drawer.h"
3
 
 
4
 
 
5
 
void Drawer::draw_reset()
6
 
{
7
 
}
8
 
 
9
 
 
10
 
void Drawer::led_on( int led, bool on )
11
 
{
12
 
        if( led < 0 || led > 9 ) return;
13
 
 
14
 
        // convert to pin no.
15
 
        led += 4;
16
 
 
17
 
        // pin 4 needs to be inverted (it's driving a PNP)
18
 
        if( led == 4 ) on = !on;
19
 
 
20
 
        digitalWrite( led, on? HIGH : LOW );
21
 
}