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 // 2.7 Inch Monocromatic Sharp Memory LCD
10 
11 #pragma once
12 
13 #include <dev/display.h>
14 
15 #define MLCD_WIDTH  ((uint16_t)400)
16 #define MLCD_HEIGHT ((uint16_t)240)
17 
18 // Ensure width corresponds to an integral number of bytes
19 STATIC_ASSERT((MLCD_WIDTH & 0x3) == 0);
20 
21 // 1 bit per pixel divided by 8 bits per byte
22 #define MLCD_BYTES_LINE  (MLCD_WIDTH / 8)
23 #define MLCD_FORMAT      (DISPLAY_FORMAT_MONO_1)
24 
25 uint8_t lcd_get_line(struct display_image *image, uint8_t idx, uint8_t *result);
26