Tue, 27 Aug 2019 12:27:36 +0200
Finished the MicroPython stubs.
MicroPython/esp.py | file | annotate | diff | comparison | revisions | |
MicroPython/esp32.py | file | annotate | diff | comparison | revisions | |
MicroPython/lcd160cr.py | file | annotate | diff | comparison | revisions | |
MicroPython/machine.py | file | annotate | diff | comparison | revisions | |
MicroPython/wipy.py | file | annotate | diff | comparison | revisions | |
micropython.e4p | file | annotate | diff | comparison | revisions |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MicroPython/esp.py Tue Aug 27 12:27:36 2019 +0200 @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module containing stubs for API generation of the def 'esp' module. +""" + +SLEEP_NONE = 0 +SLEEP_MODEM = 0 +SLEEP_LIGHT = 0 + +def sleep_type(sleep_type=None): + pass + +def deepsleep(time=0): + pass + +def flash_id(): + pass + +def flash_size(): + pass + +def flash_user_start(): + pass + +def flash_read(byte_offset, length_or_buffer): + pass + +def flash_write(byte_offset, bytes): + pass + +def flash_erase(sector_no): + pass + +def set_native_code_location(start, length): + pass
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MicroPython/esp32.py Tue Aug 27 12:27:36 2019 +0200 @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module containing stubs for API generation of the def 'esp32' module. +""" + +WAKEUP_ALL_LOW = 0 +WAKEUP_ANY_HIGH = 0 + +def wake_on_touch(wake): + pass + +def wake_on_ext0(pin, level): + pass + +def wake_on_ext1(pins, level): + pass + +def raw_temperature(): + pass + +def hall_sensor(): + pass + +class Partition(): + BOOT = 0 + RUNNING = 0 + TYPE_APP = 0 + TYPE_DATA = 0 + + def __init__(self, id): + pass + + def info(self): + pass + + def readblocks(self, block_num, buf): + pass + + def writeblocks(self, block_num, buf): + pass + + def ioctl(self, cmd, arg): + pass + + def set_boot(self): + pass + + def get_next_update(self): + pass + + @classmethod + def find(cls, type=TYPE_APP, subtype=0xff, label=None): + pass + +class ULP(): + def __init__(self): + pass + + def set_wakeup_period(self, period_index, period_us): + pass + + def load_binary(self, load_addr, program_binary): + pass + + def run(self, entry_point): + pass +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MicroPython/lcd160cr.py Tue Aug 27 12:27:36 2019 +0200 @@ -0,0 +1,162 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module containing stubs for API generation of the def 'lcd160cr' module. +""" + +PORTRAIT = 0 +LANDSCAPE = 0 +PORTRAIT_UPSIDEDOWN = 0 +LANDSCAPE_UPSIDEDOWN = 0 +STARTUP_DECO_NONE = 0 +STARTUP_DECO_MLOGO = 0 +STARTUP_DECO_INFO = 0 + +class LCD160CR(): + def __init__(self, connect=None, *, pwr=None, i2c=None, spi=None, + i2c_addr=98): + self.w = 0 + self.h = 0 + + def set_power(self, on): + pass + + def set_orient(self, orient): + pass + + def set_brightness(self, value): + pass + + def set_i2c_addr(self, addr): + pass + + def set_uart_baudrate(self, baudrate): + pass + + def set_startup_deco(self, value): + pass + + def save_to_flash(self): + pass + + def set_pixel(self, x, y, c): + pass + + def get_pixel(self, x, y): + pass + + def get_line(self, x, y, buf): + pass + + def screen_dump(self, buf, x=0, y=0, w=None, h=None): + pass + + def screen_load(self, buf): + pass + + def set_pos(self, x, y): + pass + + def set_text_color(self, fg, bg): + pass + + def set_font(self, font, scale=0, bold=0, trans=0, scroll=0): + pass + + def write(self, s): + pass + + def set_pen(self, line, fill): + pass + + def erase(self): + pass + + def dot(self, x, y): + pass + + def rect(self, x, y, w, h): + pass + + def rect_outline(self, x, y, w, h): + pass + + def rect_interior(self, x, y, w, h): + pass + + def line(self, x1, y1, x2, y2): + pass + + def dot_no_clip(self, x, y): + pass + + def rect_no_clip(self, x, y, w, h): + pass + + def rect_outline_no_clip(self, x, y, w, h): + pass + + def rect_interior_no_clip(self, x, y, w, h): + pass + + def line_no_clip(self, x1, y1, x2, y2): + pass + + def poly_dot(self, data): + pass + + def poly_line(self, data): + pass + + def touch_config(self, calib=False, save=False, irq=None): + pass + + def is_touched(self): + pass + + def get_touch(self): + pass + + def set_spi_win(self, x, y, w, h): + pass + + def fast_spi(self, flush=True): + pass + + def show_framebuf(self, buf): + pass + + def set_scroll(self, on): + pass + + def set_scroll_win(self, win, x=-1, y=0, w=0, h=0, vec=0, pat=0, + fill=0x07e0, color=0): + pass + + def set_scroll_win_param(self, win, param, value): + pass + + def set_scroll_buf(self, s): + pass + + def jpeg(self, buf): + pass + + def jpeg_start(self, total_len): + pass + + def jpeg_data(self, buf): + pass + + def feed_wdt(self): + pass + + def reset(self): + pass + + @staticmethod + def rgb(r, g, b): + pass
--- a/MicroPython/machine.py Mon Aug 26 20:44:31 2019 +0200 +++ b/MicroPython/machine.py Tue Aug 27 12:27:36 2019 +0200 @@ -313,3 +313,43 @@ def __init__(self, lot=1, width=1, cd=None, wp=None, sck=None, miso=None, mosi=None, cs=None): pass + +###################################################################### +## WiPy specific classes +###################################################################### + +class TimerWiPy(): + ONE_SHOT = 0 + PERIODIC = 0 + PWM = 0 + TIMEOUT = 0 + MATCH = 0 + POSITIVE = 0 + NEGATIVE = 0 + + def __init__(self, id, mode=None, *, width=16): + pass + + def init(self, mode, *, width=16): + pass + + def deinit(self): + pass + + def channel(self, channel, *, freq, period, polarity=POSITIVE, + duty_cycle=0): + pass + +class TimerChannel(): + def irq(self, *, trigger, priority=1, handler=None): + pass + + def freq(self, value=None): + pass + + def period(self, value=None): + pass + + def duty_cycle(self, value=None): + pass +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MicroPython/wipy.py Tue Aug 27 12:27:36 2019 +0200 @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module containing stubs for API generation of the def 'wipy' module. +""" + +def heartbeat(enable=None): + pass
--- a/micropython.e4p Mon Aug 26 20:44:31 2019 +0200 +++ b/micropython.e4p Tue Aug 27 12:27:36 2019 +0200 @@ -16,8 +16,11 @@ <Source>MicroPython/array.py</Source> <Source>MicroPython/btree.py</Source> <Source>MicroPython/cmath.py</Source> + <Source>MicroPython/esp.py</Source> + <Source>MicroPython/esp32.py</Source> <Source>MicroPython/framebuf.py</Source> <Source>MicroPython/gc.py</Source> + <Source>MicroPython/lcd160cr.py</Source> <Source>MicroPython/machine.py</Source> <Source>MicroPython/math.py</Source> <Source>MicroPython/micropython.py</Source> @@ -41,6 +44,7 @@ <Source>MicroPython/ustruct.py</Source> <Source>MicroPython/utime.py</Source> <Source>MicroPython/uzlib.py</Source> + <Source>MicroPython/wipy.py</Source> <Source>Microbit/audio.py</Source> <Source>Microbit/machine.py</Source> <Source>Microbit/microbit/__init__.py</Source>