1 /**************************************************************************/
4 @author Tauon {TauonTeilchen} Jabber ID Tauon[at]jabber.ccc.de
8 Software License Agreement (BSD License)
10 Copyright (c) 2012, TauonTeilchen
11 ----------------------------------------------------------------------------
12 "THE BEER-WARE LICENSE" (Revision 42):
13 JID: <Tauon@jabber.ccc.de> wrote this file. As long as you retain this notice you
14 can do whatever you want with this stuff. If we meet some day, and you think
15 this stuff is worth it, you can buy me a ClubMate in return Tauon
16 ----------------------------------------------------------------------------
17 ----------------------------------------------------------------------------
18 "THE ClubMate-WARE LICENSE" (Revision 42):
19 JID: <Tauon@jabber.ccc.de> schrieb diese Datei. Solange Sie diesen Vermerk nicht entfernen, koennen
20 Sie mit dem Material machen, was Sie möechten. Wenn wir uns eines Tages treffen und Sie
21 denken, das Material ist es wert, koennen Sie mir dafuer ein ClubMate ausgeben. Tauon
22 ----------------------------------------------------------------------------
24 /**************************************************************************/
26 /**************************************************************************/
27 // LCD BACK_LIGHT Pin 6 of Port 2
28 // LCD CS Pin 5 of Port 2
29 // LCD RESET Pin 4 of Port 2
30 // More infos https://github.com/watterott/MI0283QT-Adapter/raw/master/img/connecting-uno.jpg
32 /**************************************************************************/
33 #include "core/systick/systick.h"
34 #include "drivers/displays/tft/touchscreen.h"
35 #include "core/ssp/ssp.h"
36 #include "projectconfig.h"
37 #include "drivers/displays/tft/lcd.h"
41 // Screen width, height, has touchscreen, support orientation changes, support hw scrolling
42 static lcdOrientation_t hx8347dPOrientation
= LCD_ORIENTATION_LANDSCAPE
;
44 // Screen width, height, has touchscreen, support orientation changes, support hw scrolling
45 static lcdProperties_t hx8347dProperties
= { 320, 240, false, true, true };
47 /*************************************************/
49 /*************************************************/
52 /*************************************************/
54 /*************************************************/
56 // The following functions add need to be written to match the generic
57 // lcd interface defined by lcd.h
59 /**************************************************************************/
61 @brief Configures any pins or HW and initialises the LCD controller
63 /**************************************************************************/
66 void lcdBacklight(bool state
);
68 void lcdFillRGB(uint16_t data
);
69 void lcdDrawPixel(uint16_t x
, uint16_t y
, uint16_t color
);
70 void lcdDrawPixels(uint16_t x
, uint16_t y
, uint16_t *data
, uint32_t len
);
71 void lcdDrawHLine(uint16_t x0
, uint16_t x1
, uint16_t y
, uint16_t color
);
72 void lcdDrawVLine(uint16_t x
, uint16_t y0
, uint16_t y1
, uint16_t color
);
73 uint16_t lcdGetPixel(uint16_t x
, uint16_t y
);
74 void lcdSetOrientation(lcdOrientation_t orientation
);
75 lcdOrientation_t
lcdGetOrientation(void);
76 uint16_t lcdGetWidth(void);
77 uint16_t lcdGetHeight(void);
78 void lcdScroll(int16_t pixels
, uint16_t fillColor
);
79 uint16_t lcdGetControllerID(void);
80 lcdProperties_t
lcdGetProperties(void);
82 void hx8347d_Scroll(uint16_t tfa
,uint16_t vsa
,uint16_t bfa
, uint16_t vsp
);
83 void hx8347d_Standby(bool deep
);
84 void hx8347d_Wakeup(bool deep
);