Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed DMX TextLCD mbed-rtos
Screen.h
00001 #include "string.h" 00002 #include "stdint.h" 00003 #include "TextLCD.h" 00004 TextLCD lcd(p25, p24, p23, p22, p21, p26, TextLCD::LCD20x4); 00005 00006 class Screen 00007 { 00008 public: 00009 Screen(); 00010 ~Screen(); 00011 00012 void V_Printit() const; 00013 void V_Clear() const; 00014 void V_SetRij(uint32_t I32_Rij); 00015 void V_SetKolom(uint32_t I32_Kolom); 00016 void V_SetTekst(char * C_Tekst); 00017 00018 private: 00019 uint32_t I32_m_Rij; 00020 uint32_t I32_m_Kolom; 00021 char *C_m_Tekst[]; 00022 }; 00023 00024 Screen::Screen() 00025 { 00026 this->I32_m_Rij = 0; 00027 this->I32_m_Kolom = 0; 00028 *this->C_m_Tekst = ""; 00029 return; 00030 } 00031 00032 Screen::~Screen() 00033 { 00034 delete &I32_m_Rij; 00035 delete &I32_m_Kolom; 00036 delete C_m_Tekst; 00037 return; 00038 } 00039 00040 void Screen::V_SetRij(uint32_t I32_Rij) 00041 { 00042 I32_m_Rij = I32_Rij; 00043 } 00044 00045 void Screen::V_SetKolom(uint32_t I32_Kolom) 00046 { 00047 I32_m_Kolom = I32_Kolom ; 00048 } 00049 00050 void Screen::V_SetTekst(char C_Tekst[]) 00051 { 00052 *C_m_Tekst = C_Tekst; 00053 } 00054 00055 void Screen::V_Printit() const 00056 { 00057 lcd.locate(I32_m_Kolom, I32_m_Rij); 00058 lcd.printf(*C_m_Tekst); 00059 } 00060 00061 void Screen::V_Clear() const 00062 { 00063 lcd.cls(); 00064 }
Generated on Fri Jul 15 2022 01:17:23 by
1.7.2