@@ -87,7 +87,7 @@ enum ILI9488_Orientation : CLR_UINT8
87
87
MADCTL_MX = 0x40 , // sets the Column Order, 0=Left-Right and 1=Right-Left
88
88
MADCTL_MY = 0x80 , // sets the Row Order, 0=Top-Bottom and 1=Bottom-Top
89
89
90
- MADCTL_BGR = 0x00 , // Red-Green-Blue pixel order
90
+ MADCTL_RGB = 0x00 , // Red-Green-Blue pixel order
91
91
};
92
92
93
93
bool DisplayDriver::Initialize ()
@@ -172,27 +172,27 @@ bool DisplayDriver::ChangeOrientation(DisplayOrientation orientation)
172
172
Attributes.Height = Attributes.LongerSide ;
173
173
Attributes.Width = Attributes.ShorterSide ;
174
174
g_DisplayInterface.SendCommand (2 , Memory_Access_Control,
175
- (MADCTL_MX | MADCTL_BGR )); // Portrait + BGR
175
+ (MADCTL_MX | MADCTL_RGB )); // Portrait
176
176
break ;
177
177
case DisplayOrientation::DisplayOrientation_Portrait180:
178
178
Attributes.Height = Attributes.LongerSide ;
179
179
Attributes.Width = Attributes.ShorterSide ;
180
180
g_DisplayInterface.SendCommand (2 , Memory_Access_Control,
181
- (MADCTL_MY | MADCTL_BGR )); // Portrait 180 + BGR
181
+ (MADCTL_MY | MADCTL_RGB )); // Portrait 180
182
182
break ;
183
183
case DisplayOrientation::DisplayOrientation_Landscape:
184
184
Attributes.Height = Attributes.ShorterSide ;
185
185
Attributes.Width = Attributes.LongerSide ;
186
186
g_DisplayInterface.SendCommand (2 , Memory_Access_Control,
187
- (MADCTL_MV | MADCTL_BGR )); // Landscape + BGR
187
+ (MADCTL_MV | MADCTL_RGB )); // Landscape
188
188
break ;
189
189
case DisplayOrientation::DisplayOrientation_Landscape180:
190
190
Attributes.Height = Attributes.ShorterSide ;
191
191
Attributes.Width = Attributes.LongerSide ;
192
192
g_DisplayInterface.SendCommand (
193
193
2 ,
194
194
Memory_Access_Control,
195
- (MADCTL_MX | MADCTL_MY | MADCTL_MV | MADCTL_BGR )); // Landscape 180 + BGR
195
+ (MADCTL_MX | MADCTL_MY | MADCTL_MV | MADCTL_RGB )); // Landscape 180
196
196
break ;
197
197
}
198
198
return true ;
0 commit comments