class documentation

Common Hardware Configuration.

This holds hardware pin allocations etc. They are collected here to make clear in a single place which hardware elements are in use.

Pins etc are initialised here to avoid duplicate initialisation.

This, the base class is a singleton. Only one object may inherit from it.

It sets up the items which are common to all board types.

Class Method get_instance Get the Hardware configuration instance.
Method __init__ HW Configuration Constructor
Constant NP_SM NeoPixel State Machine number for RP2040 (Pico, PicoW etc).
Constant NP_SM_P2 State Machine number for RP2350 (Pico2, Pico2W)
Constant OLED_I2C The oled is on I2C 0 (default GPIO pins 4 & 5).
Property max_led Number of Leds
Property name Configuration name for display.
Property np_pin GPIO Pin for NeoPixel chain.
Class Variable _hw_conf Undocumented
Instance Variable _name Undocumented
Instance Variable _np_pin Undocumented
@classmethod
def get_instance(cls):

Get the Hardware configuration instance.

This returns the singleton Common Hardware Config instance. Note - this returns the base class for access to common asignations. It won't automatically instantiate.

The singleton is initiated on the first call to get_instance() of an inheriting class, but the singleton reference is a base class variable. Once set by the first inheriting class get_instance() call, no other inheriting class may be instantiated.

Returns
The base configuration class.
def __init__(self, name, platform):

HW Configuration Constructor

Initates the stuff common to all configurations. Checks that the platform required matches that available.

Parameters
namethe text name for display
platformthe required platform.
NP_SM =

NeoPixel State Machine number for RP2040 (Pico, PicoW etc).

Value
const(5)
NP_SM_P2 =

State Machine number for RP2350 (Pico2, Pico2W)

Value
const(9)
OLED_I2C =

The oled is on I2C 0 (default GPIO pins 4 & 5).

Value
const(0)
@property
max_led =

Number of Leds

@property
name =

Configuration name for display.

@property
np_pin =

GPIO Pin for NeoPixel chain.

_hw_conf =

Undocumented

_name =

Undocumented

_np_pin =

Undocumented