a

Dependencies:   BSP_DISCO_F429ZI LCD_DISCO_F429ZI TS_DISCO_F429ZI mbed

Led_Lcd.cpp

Committer:
pbl96
Date:
2017-04-24
Revision:
0:9d0b60394104

File content as of revision 0:9d0b60394104:

#include "mbed.h"
#include "Led_Lcd.h"

LCD_DISCO_F429ZI lcd;

void LedLcd::ButtonNoPushed(uint16_t x_pos,uint16_t y_pos, uint16_t width, uint16_t height){
    lcd.SetTextColor(LCD_COLOR_GREEN);
    lcd.DrawRect(x_pos,y_pos,width,height);
    lcd.SetTextColor(LCD_COLOR_BLUE);
    lcd.FillRect(x_pos+1,y_pos+1,width-1,height-1);
    }
void LedLcd::ButtonPushed(uint16_t x_pos,uint16_t y_pos, uint16_t width, uint16_t height) {
    lcd.SetTextColor(LCD_COLOR_GREEN);
    lcd.DrawRect(x_pos,y_pos,width,height);
    lcd.SetTextColor(LCD_COLOR_GREEN);
    lcd.FillRect(x_pos+1,y_pos+1,width-1,height-1);
    }
    
void LedLcd::SetString(uint8_t x_pos,uint8_t y_pos,uint8_t *pText, Text_AlignModeTypdef mode) {
    lcd.SetFont(&Font24);
    lcd.SetTextColor(LCD_COLOR_WHITE);
    lcd.SetBackColor(LCD_COLOR_RED);
    lcd.DisplayStringAt(x_pos, y_pos,pText, mode);
    }
    
LedLcd::LedLcd(uint8_t num) {
    lcd.Clear(LCD_COLOR_BLACK);
    if(num>=1 && num<=3) 
        column=num;
    else
        column=1;
    
    }