Skip to content

Commit e9a841b

Browse files
committed
board: vicharak vaaman and axon support
Vicharak has introduced Vaaman and Axon board which uses rk3399 and rk3588 respectively. Signed-off-by: djkabutar <[email protected]>
1 parent c9518b0 commit e9a841b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

adafruit_platformdetect/board.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def id(self) -> Optional[str]:
173173
or self._diet_pi_id()
174174
or self._asus_tinker_board_id()
175175
or self._vivid_unit_id()
176+
or self._vicharak_id()
176177
)
177178
elif chip_id == chips.RK3399PRO:
178179
board_id = self._asus_tinker_board_id()
@@ -197,6 +198,7 @@ def id(self) -> Optional[str]:
197198
or self._armbian_id()
198199
or self._rk3588_id()
199200
or self._ameridroid_id()
201+
or self._vicharak_id()
200202
)
201203
elif chip_id == chips.RYZEN_V1605B:
202204
board_id = self._udoo_id()
@@ -683,6 +685,16 @@ def _rock_pi_id(self) -> Optional[str]:
683685
board = boards.ROCK_PI_3A
684686
return board
685687

688+
def _vicharak_id(self) -> Optional[str]:
689+
"""Check what type of Vicharak Board."""
690+
board_value = self.detector.get_device_model()
691+
board = None
692+
if board_value and "VAAMAN" in board_value.upper():
693+
board = boards.VAAMAN
694+
if board_value and "AXON" in board_value.upper():
695+
board = boards.AXON
696+
return board
697+
686698
def _libre_id(self) -> Optional[str]:
687699
"""Check what type of Libre Computer board."""
688700
board_value = self.detector.get_device_model()
@@ -1036,6 +1048,11 @@ def any_rock_pi_board(self) -> bool:
10361048
"""Check whether the current board is any Rock Pi device."""
10371049
return self.id in boards._ROCK_PI_IDS
10381050

1051+
@property
1052+
def any_vicharak_board(self) -> bool:
1053+
"""Check whether the current board is any vicharak device."""
1054+
return self.id in boards._VICHARAK_BOARD_IDS
1055+
10391056
@property
10401057
def any_clockwork_pi_board(self) -> bool:
10411058
"""Check whether the current board is any Clockwork Pi device."""

adafruit_platformdetect/constants/boards.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@
218218
ROCK_PI_5 = "ROCK_PI_5"
219219
ROCK_PI_5C = "ROCK_PI_5C"
220220

221+
# Vicharak Boards
222+
VAAMAN = "VAAMAN"
223+
AXON = "AXON"
224+
221225
GREATFET_ONE = "GREATFET_ONE"
222226

223227
# SeeedStudio boards
@@ -604,6 +608,9 @@
604608
ROCK_PI_3C,
605609
)
606610

611+
# Vicharak Boards
612+
_VICHARAK_BOARD_IDS = (VAAMAN, AXON)
613+
607614
# UDOO
608615
_UDOO_BOARD_IDS = {UDOO_BOLT_V8: ("SC40-2000-0000-C0|C",), UDOO_X86: ("dummy",)}
609616

0 commit comments

Comments
 (0)