MTM PPO mbed2d-2 program

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Ledboard.cpp

Committer:
paweler
Date:
2020-06-22
Revision:
2:ce9137eb0655

File content as of revision 2:ce9137eb0655:

#include "Ledboard.h"
#include "LCD_DISCO_F429ZI.h"

extern LCD_DISCO_F429ZI lcd;

Ledboard::Ledboard(unsigned char ucColumn){
    lcd.SetFont(&Font24);
    lcd.Clear(LCD_COLOR_BLACK);
    for(unsigned char ucRow = 0; ucRow < 4; ucRow++) {
        Leds[ucRow] = new Led(ucColumn, ucRow);
    }
}

void Ledboard::On(unsigned char ucRow){
    Off();
    Leds[ucRow] -> On();
}

void Ledboard::Off(void){
    for(unsigned char ucRow = 0; ucRow<4; ucRow++){
        Leds[ucRow] -> Off();
    }
}