1 /*
2  * Copyright (c) 2015 Gurjant Kalsi <me@gurjantkalsi.com>
3  *
4  * Use of this source code is governed by a MIT-style
5  * license that can be found in the LICENSE file or at
6  * https://opensource.org/licenses/MIT
7  */
8 
9 // 1.33 Inch 3-Bit RGB Sharp Color LCD
10 
11 #pragma once
12 
13 #include <dev/display.h>
14 
15 #define MLCD_WIDTH  ((uint16_t)128)
16 #define MLCD_HEIGHT ((uint16_t)128)
17 
18 // Ensure width corresponds to an integral number of bytes
19 STATIC_ASSERT(((MLCD_WIDTH * 3) & 0x3) == 0);
20 
21 // 3 bits per pixel (1 for each of RBG) divided by 8 bits per byte.
22 #define MLCD_BYTES_LINE  ((MLCD_WIDTH * 3) / 8)
23 #define MLCD_FORMAT      (DISPLAY_FORMAT_RGB_111)
24 
25 uint8_t lcd_get_line(struct display_image *image, uint8_t idx, uint8_t *result);
26