/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock
56 by edam
updated software to include drawing abstraction infrastructure
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