class HwConf:
Known subclasses: rp2da2.lib.hw_conf.HwConfGbl, rp2da2.lib.hw_conf.HwConfLcl
Constructor: HwConf(name, platform)
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 |
Get the Hardware configuration instance. |
| Method | __init__ |
HW Configuration Constructor |
| Constant | NP |
NeoPixel State Machine number for RP2040 (Pico, PicoW etc). |
| Constant | NP |
State Machine number for RP2350 (Pico2, Pico2W) |
| Constant | OLED |
The oled is on I2C 0 (default GPIO pins 4 & 5). |
| Property | max |
Number of Leds |
| Property | name |
Configuration name for display. |
| Property | np |
GPIO Pin for NeoPixel chain. |
| Class Variable | _hw |
Undocumented |
| Instance Variable | _name |
Undocumented |
| Instance Variable | _np |
Undocumented |
rp2da2.lib.hw_conf.HwConfGbl, rp2da2.lib.hw_conf.HwConfLclGet 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. |
rp2da2.lib.hw_conf.HwConfGbl, rp2da2.lib.hw_conf.HwConfLclHW Configuration Constructor
Initates the stuff common to all configurations. Checks that the platform required matches that available.
| Parameters | |
| name | the text name for display |
| platform | the required platform. |