clear machine.pyi and replace with StdDevice

This commit is contained in:
lyon 2023-11-10 23:22:31 +08:00
parent c3986f5f03
commit 7ea34f917a
11 changed files with 19 additions and 39 deletions

View File

@ -784,11 +784,6 @@
<FileType>5</FileType>
<FilePath>..\pikascript\PikaStdTask.pyi</FilePath>
</File>
<File>
<FileName>machine.pyi</FileName>
<FileType>5</FileType>
<FilePath>..\pikascript\machine.pyi</FilePath>
</File>
</Files>
</Group>
</Groups>

View File

@ -999,11 +999,6 @@
<FileType>5</FileType>
<FilePath>..\pikascript\main.py</FilePath>
</File>
<File>
<FileName>machine.pyi</FileName>
<FileType>5</FileType>
<FilePath>..\pikascript\machine.pyi</FilePath>
</File>
<File>
<FileName>PikaStdLib.pyi</FileName>
<FileType>5</FileType>

View File

@ -774,11 +774,6 @@
<FileType>5</FileType>
<FilePath>..\pikascript\main.py</FilePath>
</File>
<File>
<FileName>machine.pyi</FileName>
<FileType>5</FileType>
<FilePath>..\pikascript\machine.pyi</FilePath>
</File>
<File>
<FileName>PikaStdLib.pyi</FileName>
<FileType>5</FileType>

View File

@ -1246,11 +1246,6 @@
<FileType>5</FileType>
<FilePath>..\pikascript\STM32G0.pyi</FilePath>
</File>
<File>
<FileName>machine.pyi</FileName>
<FileType>5</FileType>
<FilePath>..\pikascript\machine.pyi</FilePath>
</File>
</Files>
</Group>
<Group>

View File

@ -1,8 +1,8 @@
import PikaStdLib
import machine
import PikaStdDevice
time = machine.Time()
adc1 = machine.ADC()
time = PikaStdDevice.Time()
adc1 = PikaStdDevice.ADC()
adc1.setPin('PA1')
adc1.enable()

View File

@ -1,9 +1,9 @@
import PikaStdLib
import machine
import PikaStdDevice
mem = PikaStdLib.MemChecker()
io1 = machine.GPIO()
time = machine.Time()
io1 = PikaStdDevice.GPIO()
time = PikaStdDevice.Time()
io1.setPin('PA8')
io1.setMode('out')

View File

@ -1,4 +1,4 @@
from machine import GPIO as STD_GPIO
from PikaStdDevice import GPIO as STD_GPIO
print('PikaScript LED KEY')

View File

@ -1,14 +1,14 @@
import PikaStdLib
import machine
import PikaStdDevice
lcd = machine.LCD()
lcd = PikaStdDevice.LCD()
lcd.init()
lcd.clear('white')
mem = PikaStdLib.MemChecker()
key = machine.KEY()
key = PikaStdDevice.KEY()
key.init()
time = machine.Time()
time = PikaStdDevice.Time()
h = 10
w = 10
x = 10

View File

@ -1,8 +1,8 @@
import PikaStdLib
import machine
import PikaStdDevice
time = machine.Time()
pwm = machine.PWM()
time = PikaStdDevice.Time()
pwm = PikaStdDevice.PWM()
pwm.setPin('PA8')
pwm.setFrequency(2000)
pwm.setDuty(0.5)

View File

@ -1,7 +1,7 @@
import PikaStdLib
import machine
import PikaStdDevice
time = machine.Time()
time = PikaStdDevice.Time()
while True:
time.sleep_ms(500)

View File

@ -1,8 +1,8 @@
import PikaStdLib
import machine
import PikaStdDevice
time = machine.Time()
uart = machine.UART()
time = PikaStdDevice.Time()
uart = PikaStdDevice.UART()
uart.setId(1)
uart.setBaudRate(115200)
uart.enable()