-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathparallel.pyx
More file actions
27 lines (21 loc) · 909 Bytes
/
Copy pathparallel.pyx
File metadata and controls
27 lines (21 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#cython: language_level=3, boundscheck=False, wraparound=False, cdivision=True, profile=False, c_string_type=bytes
include "globals.pxi"
cdef class Parallel:
def __init__(self, Hirnwichse main):
self.main = main
cdef void reset(self) nogil:
pass
cdef uint32_t inPort(self, uint16_t ioPortAddr, uint8_t dataSize) nogil:
if (dataSize == OP_SIZE_BYTE):
pass
else:
self.main.exitError("inPort: port 0x%02x with dataSize %u not supported.", ioPortAddr, dataSize)
return BITMASK_BYTE
cdef void outPort(self, uint16_t ioPortAddr, uint32_t data, uint8_t dataSize) nogil:
if (dataSize == OP_SIZE_BYTE):
pass
else:
self.main.exitError("outPort: port 0x%02x with dataSize %u not supported. (data: 0x%04x)", ioPortAddr, dataSize, data)
return
cdef void run(self) nogil:
pass