Aa

Dependents:   EMBEED_III_zad_4 mbed3 mbed_3 MBED3_zad4

Committer:
krzysiek99
Date:
Sat Jun 13 13:28:57 2020 +0000
Revision:
1:036ba0fc54a5
Ledboard;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
krzysiek99 1:036ba0fc54a5 1 #include "Ledboard.h"
krzysiek99 1:036ba0fc54a5 2
krzysiek99 1:036ba0fc54a5 3 extern LCD_DISCO_F429ZI lcd;
krzysiek99 1:036ba0fc54a5 4
krzysiek99 1:036ba0fc54a5 5 Ledboard::Ledboard(unsigned char ucColumn)
krzysiek99 1:036ba0fc54a5 6 {
krzysiek99 1:036ba0fc54a5 7 lcd.Clear(LCD_COLOR_BLACK);
krzysiek99 1:036ba0fc54a5 8 lcd.SetBackColor(LCD_COLOR_RED);
krzysiek99 1:036ba0fc54a5 9 lcd.SetFont(&Font24);
krzysiek99 1:036ba0fc54a5 10 for(unsigned char ucRow = 0; ucRow < 4; ucRow++)
krzysiek99 1:036ba0fc54a5 11 Leds[ucRow] = new Led(ucColumn, ucRow);
krzysiek99 1:036ba0fc54a5 12 Off();
krzysiek99 1:036ba0fc54a5 13 }
krzysiek99 1:036ba0fc54a5 14
krzysiek99 1:036ba0fc54a5 15 void Ledboard::Off()
krzysiek99 1:036ba0fc54a5 16 {
krzysiek99 1:036ba0fc54a5 17 for(unsigned char ucRow = 0; ucRow < 4; ucRow++)
krzysiek99 1:036ba0fc54a5 18 Leds[ucRow]->Off();
krzysiek99 1:036ba0fc54a5 19 }
krzysiek99 1:036ba0fc54a5 20
krzysiek99 1:036ba0fc54a5 21 void Ledboard::On(unsigned char ucRowNumber)
krzysiek99 1:036ba0fc54a5 22 {
krzysiek99 1:036ba0fc54a5 23 Off();
krzysiek99 1:036ba0fc54a5 24 Leds[ucRowNumber]->On();
krzysiek99 1:036ba0fc54a5 25 }