File tree Expand file tree Collapse file tree 3 files changed +2
-37
lines changed
api_drivers/common_api_drivers/display/nv3007 Expand file tree Collapse file tree 3 files changed +2
-37
lines changed Original file line number Diff line number Diff line change 11# Copyright (c) 2024 - 2025 Kevin G. Schlosser
2+ # NV3007 version (c) 2025 Elliot Williams who just ported init code taken from the internets
23
34import time
45from micropython import const # NOQA
4344_CMD_PIXSET = const (0x3A )
4445_CMD_GETSCANLINE = const (0x45 )
4546
46-
4747def init (self ):
4848 param_buf = bytearray (12 )
4949 param_mv = memoryview (param_buf )
5050
51- ## Begin translation
52-
5351 param_buf [0 ] = 0xa5
5452 self .set_params (0xFF , param_mv [:1 ])
5553
@@ -264,7 +262,7 @@ def init(self):
264262 self .set_params (0xc6 , param_mv [:1 ])
265263
266264 param_buf [:2 ] = bytearray ([0x33 , 0x33 ]) #/ CLKCTRL16
267- self .set_paramw (0xC8 , param_mv [:2 ])
265+ self .set_params (0xC8 , param_mv [:2 ])
268266
269267 param_buf [0 ] = 0x68 #/ CLKCTRL17
270268 self .set_params (0xC9 , param_mv [:1 ])
Original file line number Diff line number Diff line change 66import lcd_bus # NOQA
77import display_driver_framework
88
9- ### begin straight-up copy from GC9A01 driver
109STATE_HIGH = display_driver_framework .STATE_HIGH
1110STATE_LOW = display_driver_framework .STATE_LOW
1211STATE_PWM = display_driver_framework .STATE_PWM
2322
2423class NV3007 (display_driver_framework .DisplayDriver ):
2524
26- ## this is probably wrong!
2725 _ORIENTATION_TABLE = (
2826 0 ,
2927 _MADCTL_MX | _MADCTL_MV ,
3028 _MADCTL_MY | _MADCTL_MX ,
3129 _MADCTL_MY | _MADCTL_MV
3230 )
3331
34- # virtual uint8_t getMadCtl(uint8_t r) const
35- # {
36- # static constexpr uint8_t madctl_table[] =
37- # {
38- # 0,
39- # MAD_MV|MAD_MX|MAD_MH ,
40- # MAD_MX|MAD_MH|MAD_MY|MAD_ML,
41- # MAD_MV| MAD_MY|MAD_ML,
42- # MAD_MY|MAD_ML,
43- # MAD_MV ,
44- # MAD_MX|MAD_MH ,
45- # MAD_MV|MAD_MX|MAD_MY|MAD_MH|MAD_ML,
46- # };
47- # return madctl_table[r];
48- # }
49-
50-
51- ## end straight-up copy
52-
53-
54- ## other bits to implement:
55- # uint8_t getColMod(uint8_t bpp) const override { return 0x05; }
56- # uint8_t getMadCtl(uint8_t r) const override { return MAD_MV | MAD_MY; }
57- # _cfg.offset_y = 12;
58-
59- ## src/lgfx/v1/panel/Panel_NV3007.hpp
60- ## _cfg.offset_y = 12;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments