/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
2
class Drawer
3
{
4
public:
5
6
	/**
7
	 * Draw an individual segment (column of pixels)
8
	 *
9
	 * @param segment the segment number
10
	 */
11
	virtual void draw( int segment ) = 0;
12
13
	/**
14
	 * Called before the first segment is drawn, once per "frame".
15
	 */
16
	virtual void draw_reset();
17
18
protected:
19
20
	/**
21
	 * Turn on/off an LED
22
	 *
23
	 * @param led index of the LED (0 to 9)
24
	 * @param on true to turn on, false to turn off
25
	 */
26
	void led_on( int led, bool on );
27
28
};