diff options
| author | Taku Fukada <naninunenor@gmail.com> | 2020-07-24 03:22:41 +0900 |
|---|---|---|
| committer | Taku Fukada <naninunenor@gmail.com> | 2020-07-24 18:20:03 +0900 |
| commit | 54a342a7f5b74f32c7a53ea483d9046e688b9830 (patch) | |
| tree | cbffe76818a71ffa52a8b7151baed21c0b387c5b /shared-bindings/sdioio | |
| parent | 543708416bc19bc1e77d859d013c4757433ad255 (diff) | |
Add and correct some type hints
Diffstat (limited to 'shared-bindings/sdioio')
| -rw-r--r-- | shared-bindings/sdioio/SDCard.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/shared-bindings/sdioio/SDCard.c b/shared-bindings/sdioio/SDCard.c index 94ba1c387..215f914fa 100644 --- a/shared-bindings/sdioio/SDCard.c +++ b/shared-bindings/sdioio/SDCard.c @@ -49,7 +49,7 @@ //| 25MHz. Usually an SDCard object is used with ``storage.VfsFat`` //| to allow file I/O to an SD card.""" //| -//| def __init__(*, clock: digitalio.DigitalInOut, command: digitalio.DigitalInOut, data: List[digitalio.DigitalInOut], frequency: int) -> None: +//| def __init__(self, clock: microcontroller.Pin, command: microcontroller.Pin, data: Sequence[microcontroller.Pin], frequency: int) -> None: //| """Construct an SDIO SD Card object with the given properties //| //| :param ~microcontroller.Pin clock: the pin to use for the clock. @@ -109,7 +109,7 @@ STATIC void check_for_deinit(sdioio_sdcard_obj_t *self) { } } -//| def configure(*, frequency: int=0, width: int=0) -> None: +//| def configure(self, frequency: int = 0, width: int = 0) -> None: //| """Configures the SDIO bus. //| //| :param int frequency: the desired clock rate in Hertz. The actual clock rate may be higher or lower due to the granularity of available clock settings. Check the `frequency` attribute for the actual clock rate. @@ -146,7 +146,7 @@ STATIC mp_obj_t sdioio_sdcard_configure(size_t n_args, const mp_obj_t *pos_args, } MP_DEFINE_CONST_FUN_OBJ_KW(sdioio_sdcard_configure_obj, 1, sdioio_sdcard_configure); -//| def count() -> int: +//| def count(self) -> int: //| """Returns the total number of sectors //| //| Due to technical limitations, this is a function and not a property. @@ -160,7 +160,7 @@ STATIC mp_obj_t sdioio_sdcard_count(mp_obj_t self_in) { } MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_count_obj, sdioio_sdcard_count); -//| def readblocks(start_block: int, buf: bytearray) -> None: +//| def readblocks(self, start_block: int, buf: bytearray) -> None: //| //| """Read one or more blocks from the card //| @@ -182,7 +182,7 @@ mp_obj_t sdioio_sdcard_readblocks(mp_obj_t self_in, mp_obj_t start_block_in, mp_ MP_DEFINE_CONST_FUN_OBJ_3(sdioio_sdcard_readblocks_obj, sdioio_sdcard_readblocks); -//| def writeblocks(start_block: int, buf: bytearray) -> None: +//| def writeblocks(self, start_block: int, buf: bytearray) -> None: //| //| """Write one or more blocks to the card //| @@ -244,7 +244,7 @@ const mp_obj_property_t sdioio_sdcard_width_obj = { (mp_obj_t)&mp_const_none_obj}, }; -//| def deinit() -> None: +//| def deinit(self) -> None: //| """Disable permanently. //| //| :return: None""" |
