aboutsummaryrefslogtreecommitdiff
path: root/include/py/homekit/linux/types.py
diff options
context:
space:
mode:
Diffstat (limited to 'include/py/homekit/linux/types.py')
-rw-r--r--include/py/homekit/linux/types.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/py/homekit/linux/types.py b/include/py/homekit/linux/types.py
new file mode 100644
index 0000000..2b934c7
--- /dev/null
+++ b/include/py/homekit/linux/types.py
@@ -0,0 +1,25 @@
+from enum import Enum
+
+
+class LinuxBoardType(Enum):
+ ORANGE_PI_ONE = 'opione'
+ ORANGE_PI_ONE_PLUS = 'opioneplus'
+ ORANGE_PI_LITE = 'opilite'
+ ORANGE_PI_ZERO = 'opizero'
+ ORANGE_PI_ZERO2 = 'opizero2'
+ ORANGE_PI_PC = 'opipc'
+ ORANGE_PI_PC2 = 'opipc2'
+ ORANGE_PI_3 = 'opi3'
+ ORANGE_PI_3_LTS = 'opi3lts'
+ ORANGE_PI_5 = 'opi5'
+
+ @property
+ def ram(self) -> int:
+ if self in (LinuxBoardType.ORANGE_PI_ONE, LinuxBoardType.ORANGE_PI_LITE, LinuxBoardType.ORANGE_PI_ZERO):
+ return 512
+ elif self in (LinuxBoardType.ORANGE_PI_ZERO2, LinuxBoardType.ORANGE_PI_PC, LinuxBoardType.ORANGE_PI_PC2, LinuxBoardType.ORANGE_PI_ONE_PLUS):
+ return 1024
+ elif self in (LinuxBoardType.ORANGE_PI_3, LinuxBoardType.ORANGE_PI_3_LTS):
+ return 2048
+ elif self in (LinuxBoardType.ORANGE_PI_5,):
+ return 8192