Skip to content

Commit f7d8cfb

Browse files
committed
working on the stub files.
1 parent f77d5c0 commit f7d8cfb

File tree

2 files changed

+2513
-34
lines changed

2 files changed

+2513
-34
lines changed

lcd_bus.pyi

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,6 @@ MEMORY_DEFAULT: Final[int] = ...
1313
DEBUG_ENABLED: Final[int] = ...
1414

1515

16-
class SPI3Wire:
17-
18-
def __init__(
19-
self,
20-
*,
21-
mosi: int,
22-
sclk: int,
23-
freq: int = 500000,
24-
cs: int = -1,
25-
cs_high_active: bool = False,
26-
keep_cs_inactive: bool = True,
27-
lsb_first: bool = False,
28-
dc_zero_on_data: bool = False,
29-
use_dc_bit: bool = False,
30-
):
31-
...
32-
33-
def init(self, cmd_bits: int, param_bits: int, /) -> None:
34-
...
35-
36-
def deinit(self) -> None:
37-
...
38-
39-
def tx_param(self, cmd: int, params: Optional[_BufferType] = None, /) -> None:
40-
...
41-
42-
4316
class I2CBus:
4417

4518
def __init__(
@@ -74,7 +47,7 @@ class I2CBus:
7447
def tx_param(self, cmd: int, params: Optional[_BufferType] = None, /) -> None:
7548
...
7649

77-
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, /) -> None:
50+
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, rotation: int, last_update: bool, /) -> None:
7851
...
7952

8053
def rx_param(self, cmd: int, params: _BufferType, /) -> None:
@@ -86,13 +59,16 @@ class I2CBus:
8659
def allocate_framebuffer(self, size: int, caps: int, /) -> Union[None, memoryview]:
8760
...
8861

62+
def free_framebuffer(self, framebuffer: memoryview, /) -> None:
63+
...
64+
8965

9066
class SPIBus:
9167

9268
def __init__(
9369
self,
9470
*,
95-
spi_bus: _spi.SPI,
71+
spi_bus: _spi.SPI.Bus,
9672
freq: int,
9773
dc: int,
9874
cs: Optional[int] = -1,
@@ -119,7 +95,7 @@ class SPIBus:
11995
def tx_param(self, cmd: int, params: Optional[_BufferType] = None, /) -> None:
12096
...
12197

122-
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, /) -> None:
98+
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, rotation: int, last_update: bool, /) -> None:
12399
...
124100

125101
def rx_param(self, cmd: int, params: _BufferType, /) -> None:
@@ -131,6 +107,9 @@ class SPIBus:
131107
def allocate_framebuffer(self, size: int, caps: int, /) -> Union[None, memoryview]:
132108
...
133109

110+
def free_framebuffer(self, framebuffer: memoryview, /) -> None:
111+
...
112+
134113

135114
class SDLBus:
136115
WINDOW_FULLSCREEN: ClassVar[int] = ...
@@ -214,7 +193,7 @@ class SDLBus:
214193
) -> None:
215194
...
216195

217-
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, /) -> None:
196+
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, rotation: int, last_update: bool, /) -> None:
218197
...
219198

220199
def rx_param(self, cmd: int, params: _BufferType, /) -> None:
@@ -226,6 +205,9 @@ class SDLBus:
226205
def allocate_framebuffer(self, size: int, caps: int, /) -> Union[None, memoryview]:
227206
...
228207

208+
def free_framebuffer(self, framebuffer: memoryview, /) -> None:
209+
...
210+
229211
def poll_events(self):
230212
...
231213

@@ -237,7 +219,6 @@ class RGBBus:
237219
hsync: int,
238220
vsync: int,
239221
de: int,
240-
disp: int,
241222
pclk: int,
242223
data0: int,
243224
data1: int,
@@ -287,7 +268,7 @@ class RGBBus:
287268
def tx_param(self, cmd: int, params: Optional[_BufferType] = None, /) -> None:
288269
...
289270

290-
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, /) -> None:
271+
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, rotation: int, last_update: bool, /) -> None:
291272
...
292273

293274
def rx_param(self, cmd: int, params: _BufferType, /) -> None:
@@ -299,6 +280,9 @@ class RGBBus:
299280
def allocate_framebuffer(self, size: int, caps: int, /) -> Union[None, memoryview]:
300281
...
301282

283+
def free_framebuffer(self, framebuffer: memoryview, /) -> None:
284+
...
285+
302286

303287
class I80Bus:
304288

@@ -349,7 +333,7 @@ class I80Bus:
349333
def register_callback(self, callback: Callable[[Any, Any], None], /) -> None:
350334
...
351335

352-
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, /) -> None:
336+
def tx_color(self, cmd: int, data: _BufferType, start_x: int, start_y: int, end_x: int, end_y: int, rotation: int, last_update: bool, /) -> None:
353337
...
354338

355339
def tx_param(self, cmd: int, data: _BufferType, /) -> None:
@@ -364,6 +348,13 @@ class I80Bus:
364348
def allocate_framebuffer(self, size: int, caps: int, /) -> Union[None, memoryview]:
365349
...
366350

351+
def free_framebuffer(self, framebuffer: memoryview, /) -> None:
352+
...
353+
354+
355+
def _pump_main_thread() -> None:
356+
...
357+
367358

368359
del Any
369360
del Callable

0 commit comments

Comments
 (0)