/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/test_mode.cc

  • Committer: edam
  • Date: 2011-12-02 01:18:26 UTC
  • Revision ID: edam@waxworlds.org-20111202011826-uzjcdp535mlb98sl
moved kicad files in to "project" directory, which *in future projects) can hold scematics and PCB designs

Show diffs side-by-side

added added

removed removed

1
 
#include "test_mode.h"
2
 
 
3
 
 
4
 
TestMode::TestMode()
5
 
    :
6
 
        MinorMode( 1 )
7
 
{
8
 
}
9
 
 
10
 
 
11
 
void TestMode::draw( int segment )
12
 
{
13
 
        // turn on outside LEDs
14
 
        led_on( 9, true );
15
 
 
16
 
        // display segment number in binary across in the inside LEDs,
17
 
        // with the LED on pin 12 showing the least-significant bit
18
 
        for( int a = 0; a < 9; a++ )
19
 
                led_on( 8 - a, ( segment >> a ) & 1 );
20
 
}
21