mirror of
https://github.com/lowobservable/coax.git
synced 2026-02-28 01:35:50 +00:00
23 lines
376 B
Python
23 lines
376 B
Python
"""
|
|
coax.multiplexer
|
|
~~~~~~~~~~~~~~~~
|
|
"""
|
|
|
|
PORT_MAP_3299 = [
|
|
# The 3299-2 port numbers appear to be LSB first
|
|
0b000000,
|
|
0b100000,
|
|
0b010000,
|
|
0b110000,
|
|
0b001000,
|
|
0b101000,
|
|
0b011000,
|
|
0b111000
|
|
]
|
|
|
|
def get_device_address(port):
|
|
if port < 0 or port > 7:
|
|
raise ValueError('Port must be between 0 and 7')
|
|
|
|
return PORT_MAP_3299[port]
|