소스 검색

use FM6126A panel init

Thomas Buck 1 년 전
부모
커밋
cf6f911254
1개의 변경된 파일3개의 추가작업 그리고 14개의 파일을 삭제
  1. 3
    14
      pico.py

+ 3
- 14
pico.py 파일 보기

@@ -11,9 +11,10 @@
11 11
 # ----------------------------------------------------------------------------
12 12
 
13 13
 import interstate75
14
+import hub75
14 15
 from mapper import MapperReduceBrightness
15 16
 import time
16
-from machine import Pin, mem32
17
+from machine import Pin
17 18
 
18 19
 class PicoMatrix:
19 20
     def __init__(self, w = 32, h = 32):
@@ -30,7 +31,7 @@ class PicoMatrix:
30 31
             raise RuntimeError("TODO not yet supported")
31 32
 
32 33
         mode = interstate75.DISPLAY_INTERSTATE75_32X32
33
-        self.matrix = interstate75.Interstate75(display = mode)
34
+        self.matrix = interstate75.Interstate75(display = mode, panel_type = hub75.PANEL_FM6126A)
34 35
 
35 36
         self.black = self.matrix.display.create_pen(0, 0, 0)
36 37
         self.white = self.matrix.display.create_pen(255, 255, 255)
@@ -38,18 +39,6 @@ class PicoMatrix:
38 39
         self.ledTime = time.time()
39 40
         self.led = Pin("LED", Pin.OUT)
40 41
 
41
-        # For all matrix pins r0, g0, b0, r1, g1, b1, a, b, c, d, e:
42
-        # reduce drive-strength to minimum 2mA and set slew to slow.
43
-        # Attempt to reduce ghosting on display. Not really helping :(
44
-        io_base = 0x4001c000
45
-        io_off = 0x04
46
-        io_inc = 0x04
47
-        for p in range(0, 11):
48
-            reg = io_base + (p * io_inc) + io_off
49
-            val = mem32[reg]
50
-            val = val & 0xFFFFFFCE
51
-            mem32[reg] = val
52
-
53 42
         self.loop_start() # initialize with blank image for ScrollText constructor
54 43
 
55 44
     def loop_start(self):

Loading…
취소
저장