2021-10-28 16:05:35 +08:00
|
|
|
from PikaObj import *
|
2021-10-01 20:00:15 +08:00
|
|
|
import PikaStdDevice
|
|
|
|
|
|
|
|
|
|
|
|
class GPIO(PikaStdDevice.GPIO):
|
|
|
|
# override
|
|
|
|
def platformHigh():
|
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
|
|
|
def platformLow():
|
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
|
|
|
def platformEnable():
|
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
|
|
|
def platformDisable():
|
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformSetMode():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
2021-10-25 20:16:08 +08:00
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformRead():
|
2021-10-25 20:16:08 +08:00
|
|
|
pass
|
|
|
|
|
2021-10-01 20:00:15 +08:00
|
|
|
|
|
|
|
class Time(PikaStdDevice.Time):
|
|
|
|
# override
|
|
|
|
def sleep_s(s: int):
|
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
|
|
|
def sleep_ms(ms: int):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class ADC(PikaStdDevice.ADC):
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformEnable():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformRead():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class UART(PikaStdDevice.UART):
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformEnable():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformWrite():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformRead():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
2021-10-22 22:28:54 +08:00
|
|
|
|
2021-10-01 20:00:15 +08:00
|
|
|
class PWM(PikaStdDevice.PWM):
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformEnable():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformSetFrequency():
|
2021-10-01 20:00:15 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformSetDuty():
|
2021-10-22 22:28:54 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class IIC(PikaStdDevice.IIC):
|
|
|
|
SCL = GPIO()
|
|
|
|
SDA = GPIO()
|
|
|
|
# override
|
|
|
|
|
|
|
|
def platformEnable():
|
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformWrite():
|
2021-10-22 22:28:54 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
2021-11-06 19:11:25 +08:00
|
|
|
def platformRead():
|
2021-10-22 22:28:54 +08:00
|
|
|
pass
|
2021-10-28 16:05:35 +08:00
|
|
|
|
|
|
|
|
|
|
|
class lowLevel(TinyObj):
|
|
|
|
def readPin(pin: str) -> int:
|
|
|
|
pass
|