Choco OS  V.0.16.9.0
Join to the chocolate world
oc_lcdtft.h
Go to the documentation of this file.
1 
33 #ifndef _OC_LCDTFT_H
34 #define _OC_LCDTFT_H
35 #define DRIVER_HEADER
36 #define DRIVER_NAME LCDTFT
37 
38 #include <oc_driver.h>
39 #include <oc_stdlib.h>
40 #include <oc_ioctl.h>
41 #include <oc_lcdtft_lld.h>
42 #include <oc_stdtypes.h>
43 #include <oc_color.h>
44 #include <oc_font.h>
45 #include <oc_pixel.h>
46 #include <oc_frequency.h>
47 
48 #ifdef oC_LCDTFT_LLD_AVAILABLE
49 
55 #define _________________________________________DEFINITIONS_SECTION________________________________________________________________________
56 
57 
58 
59 #undef _________________________________________DEFINITIONS_SECTION________________________________________________________________________
60 
61 
67 #define _________________________________________TYPES_SECTION______________________________________________________________________________
68 
69 
70 typedef enum
71 {
72  oC_LCDTFT_PixelClockPolarity_InputPixelClock = oC_LCDTFT_LLD_PixelClockPolarity_InputPixelClock,
73  oC_LCDTFT_PixelClockPolarity_InvertedInputPixe = oC_LCDTFT_LLD_PixelClockPolarity_InvertedInputPixelClock
74 } oC_LCDTFT_PixelClockPolarity_t;
75 
76 typedef enum
77 {
78  oC_LCDTFT_Polarity_ActiveLow = oC_LCDTFT_LLD_Polarity_ActiveLow ,
79  oC_LCDTFT_Polarity_ActiveHigh = oC_LCDTFT_LLD_Polarity_ActiveHigh
80 } oC_LCDTFT_Polarity_t;
81 
82 //==========================================================================================================================================
91 //==========================================================================================================================================
92 typedef struct
93 {
94  oC_Pixel_ResolutionUInt_t Width;
95  oC_Pixel_ResolutionUInt_t Height;
96  oC_ColorFormat_t ColorFormat;
97  oC_Frequency_t ClockFrequency;
98  oC_Frequency_t PermissibleDifference;
99  oC_LCDTFT_Polarity_t HSyncPolarity;
100  oC_LCDTFT_Polarity_t VSyncPolarity;
101  oC_LCDTFT_Polarity_t DESyncPolarity;
102  oC_LCDTFT_PixelClockPolarity_t PixelClockPolarity;
103  oC_LCDTFT_LLD_TimingParameters_t TimingParameters;
105  const oC_ColorMap_t * const ColorMap;
107 
108 //==========================================================================================================================================
117 //==========================================================================================================================================
119 
120 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
121 
127 #define _________________________________________INTERFACE_FUNCTIONS_SECTION________________________________________________________________
128 
131 extern oC_ErrorCode_t oC_LCDTFT_TurnOn ( void );
132 extern oC_ErrorCode_t oC_LCDTFT_TurnOff ( void );
133 extern bool oC_LCDTFT_IsTurnedOn ( void );
134 extern oC_ErrorCode_t oC_LCDTFT_Configure ( const oC_LCDTFT_Config_t * Config , oC_LCDTFT_Context_t * outContext );
135 extern oC_ErrorCode_t oC_LCDTFT_Unconfigure ( const oC_LCDTFT_Config_t * Config , oC_LCDTFT_Context_t * outContext );
136 extern oC_ErrorCode_t oC_LCDTFT_Ioctl ( oC_LCDTFT_Context_t Context , oC_Ioctl_Command_t Command , void * Data );
137 extern oC_ErrorCode_t oC_LCDTFT_SetBackgroundColor ( oC_LCDTFT_Context_t Context , oC_Color_t Color , oC_ColorFormat_t ColorFormat );
138 extern oC_ErrorCode_t oC_LCDTFT_ReadBackgroundColor ( oC_LCDTFT_Context_t Context , oC_Color_t * outColor , oC_ColorFormat_t ColorFormat );
139 extern oC_ErrorCode_t oC_LCDTFT_ReadColorMap ( oC_LCDTFT_Context_t Context , oC_ColorMap_t ** outColorMap );
140 extern oC_ErrorCode_t oC_LCDTFT_SetResolution ( oC_LCDTFT_Context_t Context , oC_Pixel_ResolutionUInt_t Width , oC_Pixel_ResolutionUInt_t Height );
141 extern oC_ErrorCode_t oC_LCDTFT_ReadResolution ( oC_LCDTFT_Context_t Context , oC_Pixel_ResolutionUInt_t * outWidth , oC_Pixel_ResolutionUInt_t * outHeight );
142 
143 #undef _________________________________________INTERFACE_FUNCTIONS_SECTION________________________________________________________________
144 
146 #endif
147 #endif /* _OC_LCDTFT_H */
oC_ErrorCode_t oC_LCDTFT_TurnOff(void)
Turns off the LCDTFT driver.
Definition: oc_lcdtft.c:187
The file with frequency definitions.
double oC_Frequency_t
type to store frequency
Definition: oc_frequency.h:76
oC_ErrorCode_t oC_LCDTFT_Ioctl(oC_LCDTFT_Context_t Context, oC_Ioctl_Command_t Command, void *Data)
handles input/output driver commands
Definition: oc_lcdtft.c:325
oC_ErrorCode_t oC_LCDTFT_Configure(const oC_LCDTFT_Config_t *Config, oC_LCDTFT_Context_t *outContext)
configures LCDTFT pins to work
Definition: oc_lcdtft.c:231
struct Context_t * oC_LCDTFT_Context_t
The LCDTFT context structure.
Definition: oc_lcdtft.h:118
The file with interface for the color library.
The file with interface for driver creating.
The file with interface for the GPIO driver.
oC_ErrorCode_t oC_LCDTFT_TurnOn(void)
turns on the module
Definition: oc_lcdtft.c:153
The file with interface for the GPIO driver.
The file with interface for IOCTL.
stores ETH context
Definition: oc_eth.c:97
oC_ErrorCode_t oC_LCDTFT_Unconfigure(const oC_LCDTFT_Config_t *Config, oC_LCDTFT_Context_t *outContext)
Unconfigures the driver.
Definition: oc_lcdtft.c:286
LCDTFT driver configuration structure.
Definition: oc_lcdtft.h:92
The file with LLD interface for the LCDTFT driver.
bool oC_LCDTFT_IsTurnedOn(void)
checks if the driver is turned on
Definition: oc_lcdtft.c:214
FILE__DESCRIPTION