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