2022-04-26 21:38:15 +08:00
|
|
|
#api
|
2021-11-21 16:33:57 +08:00
|
|
|
from PikaObj import *
|
|
|
|
import PikaStdDevice
|
2022-01-23 21:31:07 +08:00
|
|
|
import PikaStdTask
|
2021-11-21 16:33:57 +08:00
|
|
|
|
|
|
|
|
2022-11-21 02:01:46 +08:00
|
|
|
class GPIO(PikaStdDevice.GPIO): ...
|
2021-11-21 16:33:57 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Time(PikaStdDevice.Time):
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def sleep_s(self, s: int):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def sleep_ms(self, ms: int):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class ADC(PikaStdDevice.ADC):
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformEnable(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformRead(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class UART(PikaStdDevice.UART):
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformEnable(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformWrite(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformRead(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class PWM(PikaStdDevice.PWM):
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformEnable(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformSetFrequency(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformSetDuty(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class IIC(PikaStdDevice.IIC):
|
|
|
|
SCL = GPIO()
|
|
|
|
SDA = GPIO()
|
|
|
|
# override
|
|
|
|
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformEnable(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformWrite(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformRead(self):
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class lowLevel(TinyObj):
|
2022-04-07 23:37:35 +08:00
|
|
|
def readPin(self, pin: str) -> int:
|
2021-11-21 16:33:57 +08:00
|
|
|
pass
|
2022-01-23 21:31:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Task(PikaStdTask.Task):
|
|
|
|
# override
|
2022-04-07 23:37:35 +08:00
|
|
|
def platformGetTick(self):
|
2022-01-23 21:31:07 +08:00
|
|
|
pass
|