hub.port – Port

This module contains instances of the Port class, created automatically when the hub boots.

Attributes

hub.port.A

Port A on the hub.

hub.port.B

Port B on the hub.

hub.port.C

Port C on the hub.

hub.port.D

Port D on the hub.

hub.port.E

Port E on the hub.

hub.port.F

Port F on the hub.

Constants

These constants can be used with the Port.callback method.

Port events

hub.port.DETACHED = 0

A device was detached from the port.

hub.port.ATTACHED = 1

A new device is attached to the port.

Port modes

These constants can be used with the Port.mode method.

hub.port.MODE_DEFAULT = 0

The port is Powered Up compatible.

hub.port.MODE_FULL_DUPLEX = 1

The port operates as a raw full duplex logic level serial port.

hub.port.MODE_HALF_DUPLEX = 2

The port operates as a raw half duplex differential level serial port.

hub.port.MODE_GPIO = 3

The port operates as general input and output Pin.