displaying on SSD1306, 128x64 pixels OLED
Diff: Display.h
- Revision:
- 12:b4d5e007640e
- Parent:
- 10:8bf77efd1579
--- a/Display.h Tue Feb 25 18:22:01 2020 +0000 +++ b/Display.h Tue Feb 25 20:59:35 2020 +0000 @@ -5,8 +5,9 @@ #define microbitOLED_Display /** - * Constructer takes five 5bit and a being true 'showing left column' - * parameters for the led display. + * Constructs display by parameters to the '5 rows'. + * Takes five 5bit values in range [0,31] and a bool \n + * value for 'showing left bit column' */ struct Ledrows { union { @@ -25,17 +26,18 @@ /** - * Use Microbit 5x5 led display in various output communications + * Use Microbit 5x5 led display in various output communications. * It deals with display in DISPLAY_MODE_BLACK_AND_WHITE mode */ class Display { /** - * Representation the 25 leds, counting from right bottom and continuing - * from right on each row above. Light on is the pixel value 1 or true - * Writting to the display is writting to this buffer AND the display only - * if a value is changed - this demands clearing the display is clearing this - * buffer prior uDisplay.image.clear();; + * Representation the 25 leds. + * The physical leds are counted from right bottom and continuing \n + * from right on each row above. Light in a led corresponds to 1 stick.\n + * Writting to the display is writting to this buffer AND the display \n + * only if a value is changed - this demands clearing the display is \n + * nullifying this stick prior uDisplay.image.clear(); */ bool stick[25]; MicroBitDisplay & uDisplay; @@ -47,8 +49,11 @@ public: /** - * When constructed from MicroBit's MicroBitDisplay of a not yet initialized - * MicroBit object - that must be done before using the Display instance. + * Display hold a refference to a MicroBitDisplay object. + * When constructed from MicroBit's MicroBitDisplay of a not yet initialized \n + * MicroBit object - that must be done before using the Display instance.\n + * + * @param uDpl reference to a MicroBitDisplay object. */ Display(MicroBitDisplay & uDpl); @@ -59,19 +64,20 @@ /** * The stick's length is represented by the count of digits being 1. + * * @param size in range [0,24] */ void setStick(uint8_t size); /** - * Set a single dot + * Set a single dot. * * @param position in [0,24] for showing that single dot. */ void setFlag(uint8_t position); /** - * Puts a bitpattern in a row + * Puts a bitpattern in a row. * * @param rowNr in [0,4] for selected row * @param rowContent in [0,31] to be shown binary @@ -86,8 +92,12 @@ void toRows(uint32_t allBits); /** - * Vertdecimal is intended for showing a single number in [00000,99999], - * vertical read from top to bottom. + * Vertdecimal shows a single number in [00000,99999]. + * The parameters goes from top to bottom, whereas a obvious \n + * perception is reading the disply number from top bottom. \n + * Nothing restrict the rows to hold values less teen \n + * but if some are greather than 31 the value or proberbly \n + * bitwise ored og cleared by other numbers * * @param r0 bottom row - row 0 * @param r1 row 1 @@ -98,9 +108,10 @@ void vertDecimal(uint8_t r0,uint8_t r1,uint8_t r2,uint8_t r3,uint8_t r4); /** - * Vertdecimal is intended for showing a single number in [00000,99999], - * vertical read from top to bottom. - * + * Vertdecimal shows a single number in [00000,99999]. + * The parameters goes from top to bottom, whereas a obvious \n + * perception is reading the disply number from top bottom. \n + * It os possible to turn on left column on the display * * @param r0 bottom row - row 0 * @param r1 row 1 @@ -112,7 +123,8 @@ void vertDecimal(uint8_t r0,uint8_t r1,uint8_t r2,uint8_t r3,uint8_t r4, bool leftDotOn); /** - * Binary Clock, hours in top rows (4 for multiplum of 10, 3 for remainer) + * Binary Clock with hours and minuts. + * hours in top rows (4 for multiplum of 10, 3 for remainer) \n * minuts in bottom rows (1 for multiplum of 10, 0 for remainer) * * @param minuts of the day @@ -120,9 +132,11 @@ void vertClock(uint16_t minuts); /** - * Binary Clock, hours in row 4 (top row) - * minuts in rows 3 and 2 (3 for multiplum of 10, 2 for remainer) - * seconds in rows 1 and 0 (1 for multiplum of 10, 0 for remainer) + * Binary Clock with hours, minuts an seconds. + * hours in row 4 (top row)\n + * minuts in rows 3 and 2 (3 for multiplum of 10, 2 for remainer)\n + * seconds in rows 1 and 0 (1 for multiplum of 10, 0 for remainer)\n + * * @param second of the day */ void vertSecClock(uint32_t minuts);