After you have copied the repository, or repo for short, you'll want to go into the adafruit_platformdetect/constants folder. Here you will find a couple of files named boards.py and chips.py. This is where you will add your constants for the board and chip files.
chips.py Constants
These should just be in the format with the string value matching the constant name, so for the Pine A64 chip, we would add:
A64 = "A64"
If you are using a longer name with multiple words, they should be separated by underscores.
boards.py Constants
Board constants should be in the same format as the chip so, for the Pine64 we can add it like:
PINE64 = "PINE64"
Next, the new board constant may need to be added to a group as well. If the new board you are adding is from the same manufacturer as an existing board, you should either add it to that group, if one exists, or create a new group. For the Pine64, there was already a couple other boards, so we will just make sure the new ID is inside the group.
_PINE64_DEV_IDS = (
PINE64,
PINEBOOK,
PINEPHONE
)
Page last edited March 08, 2024
Text editor powered by tinymce.