2021-12-05 22:13:32 +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
|
|
|
|
def platformSetMode():
|
|
|
|
pass
|
|
|
|
|
|
|
|
# override
|
|
|
|
def platformRead():
|
|
|
|
pass
|
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
class ADC(PikaStdDevice.ADC):
|
|
|
|
# override
|
|
|
|
def platformEnable():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
# override
|
|
|
|
def platformRead():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
class UART(PikaStdDevice.UART):
|
|
|
|
# override
|
|
|
|
def platformEnable():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
# override
|
|
|
|
def platformWrite():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
# override
|
|
|
|
def platformRead():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
class PWM(PikaStdDevice.PWM):
|
|
|
|
# override
|
|
|
|
def platformEnable():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
# override
|
|
|
|
def platformSetFrequency():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
# override
|
|
|
|
def platformSetDuty():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
class IIC(PikaStdDevice.IIC):
|
|
|
|
SCL = GPIO()
|
|
|
|
SDA = GPIO()
|
|
|
|
# override
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
def platformEnable():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
# override
|
|
|
|
def platformWrite():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
2021-12-11 20:12:20 +08:00
|
|
|
# override
|
|
|
|
def platformRead():
|
|
|
|
pass
|
2021-12-05 22:13:32 +08:00
|
|
|
|
|
|
|
|
2022-08-22 16:58:26 +08:00
|
|
|
class lowLevel:
|
2021-12-05 22:13:32 +08:00
|
|
|
def readPin(pin: str) -> int:
|
|
|
|
pass
|