From 27f34face1c2aa62c01e5d73a7e23f357555892c Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Wed, 7 Oct 2015 14:21:34 -0700 Subject: [PATCH] st7735: removed unused variables and updated initialization list Signed-off-by: Mihai Tudor Panu --- src/st7735/st7735.cxx | 11 +++-------- src/st7735/st7735.h | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/st7735/st7735.cxx b/src/st7735/st7735.cxx index c0aed8fc..ac01c565 100644 --- a/src/st7735/st7735.cxx +++ b/src/st7735/st7735.cxx @@ -35,15 +35,10 @@ using namespace upm; ST7735::ST7735 (uint8_t csLCD, uint8_t cSD, uint8_t rs, uint8_t rst) - : GFX (160, 128, m_map, font), m_csLCDPinCtx(m_csLCD), m_cSDPinCtx(m_cSD), - m_rSTPinCtx(m_rST), m_rSPinCtx(m_rS), m_spi(0) { + : GFX (160, 128, m_map, font), m_csLCDPinCtx(csLCD), m_cSDPinCtx(cSD), + m_rSTPinCtx(rst), m_rSPinCtx(rs), m_spi(0) { - m_csLCD = csLCD; - m_cSD = cSD; - m_rST = rst; - m_rS = rs; - - initModule (); + initModule (); configModule (); } diff --git a/src/st7735/st7735.h b/src/st7735/st7735.h index eebb4d06..5f6a01bc 100644 --- a/src/st7735/st7735.h +++ b/src/st7735/st7735.h @@ -626,19 +626,14 @@ class ST7735 : public GFX { uint8_t m_map[160 * 128 * 2]; /**< Screens buffer */ private: mraa::Spi m_spi; - uint8_t m_csLCD; - uint8_t m_cSD; - uint8_t m_rST; - uint8_t m_rS; - + uint8_t m_spiBuffer[32]; + mraa::Gpio m_csLCDPinCtx; mraa::Gpio m_cSDPinCtx; mraa::Gpio m_rSTPinCtx; mraa::Gpio m_rSPinCtx; - uint8_t m_spiBuffer[32]; - - std::string m_name; + std::string m_name; }; }