aghmtmppo

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI BSP_DISCO_F429ZI

Led_Board.cpp

Committer:
domino5740
Date:
2020-06-15
Revision:
0:b7f6cb529d74

File content as of revision 0:b7f6cb529d74:

#include "Led_Board.h"
#include "LCD_DISCO_F429ZI.h"

extern LCD_DISCO_F429ZI lcd;

LedBoard::LedBoard(unsigned char ucColumn) {
    
    lcd.Clear(LCD_COLOR_BLACK);
    lcd.SetBackColor(LCD_COLOR_BLACK);
    BSP_LCD_SetFont(&Font24);
    
    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();
    }
    
}