micropython/extmod
Jim Mussared 5f8f32f917 extmod/modnetwork: Use a type protocol to implement NIC functions.
This was previously implemented by adding additional members to the
mp_obj_type_t defined for each NIC, which is difficult to do cleanly with
the new object type slots mechanism. The way this works is also not
supported on GCC 8.x and below.

Instead replace it with the type protocol, which is a much simpler way of
achieving the same thing.

This affects the WizNet (in non-LWIP mode) and Nina NIC drivers.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-12-15 17:40:06 +11:00
..
axtls-include extmod: Update for move of crypto-algorithms, re1.5, uzlib to lib. 2021-07-12 16:37:07 +10:00
btstack extmod/btstack: Allow the BTstack config to be overridden by a board. 2022-11-11 15:14:14 +11:00
lwip-include all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
mbedtls extmod/mbedtls: Remove brainpool curves from config. 2022-10-22 19:12:46 +11:00
nimble extmod: Make extmod.mk self-contained. 2022-10-11 23:31:49 +11:00
uasyncio extmod/uasyncio: Fix syntax of generator functions. 2022-12-14 13:25:24 +11:00
extmod.cmake extmod/extmod.cmake: Add MICROPY_PY_BTREE compiler definition. 2022-11-17 23:20:58 +11:00
extmod.mk extmod/extmod.mk: Set default mbedtls config file in extmod Makefile. 2022-11-09 18:43:13 +01:00
font_petme128_8x8.h extmod: Move font_petme128_8x8.h from ports/stm32 to extmod. 2022-05-05 13:30:40 +10:00
machine_bitstream.c extmod: Add machine.bitstream. 2021-08-19 22:50:11 +10:00
machine_bitstream.h extmod: Add machine.bitstream. 2021-08-19 22:50:11 +10:00
machine_i2c.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_i2c.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_mem.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_mem.h all: Use the name MicroPython consistently in comments 2017-07-31 18:35:40 +10:00
machine_pinbase.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_pinbase.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_pulse.c esp8266: Provide custom machine_time_pulse_us that feeds soft WDT. 2019-07-01 22:53:00 +10:00
machine_pulse.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_pwm.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_pwm.h extmod/machine_pwm: Factor out machine.PWM bindings to common code. 2021-09-04 16:31:17 +10:00
machine_signal.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_signal.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00
machine_spi.c extmod: Add and reorganise compilation guards and includes. 2022-11-11 16:24:32 +11:00
machine_spi.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_timer.c extmod: Add and reorganise compilation guards and includes. 2022-11-11 16:24:32 +11:00
misc.h stm32/moduos: Convert module to use extmod version. 2022-03-09 10:03:23 +11:00
modbluetooth.c extmod/modbluetooth: Run BLE IRQ callback in protected NLR context. 2022-09-23 15:21:54 +10:00
modbluetooth.h extmod/modbluetooth: Change data_len type from size_t to uint16_t. 2022-09-22 11:47:03 +10:00
modbtree.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modframebuf.c extmod/modframebuf: Fix crash in FrameBuffer scrolling beyond extents. 2022-12-09 16:47:23 +11:00
modlwip.c extmod/modlwip: Use actual errno in exception for error in listen. 2022-11-09 10:48:53 +11:00
modnetwork.c extmod/modnetwork: Use a type protocol to implement NIC functions. 2022-12-15 17:40:06 +11:00
modnetwork.h extmod/modnetwork: Use a type protocol to implement NIC functions. 2022-12-15 17:40:06 +11:00
modonewire.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
moduasyncio.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modubinascii.c py/objstr: Split mp_obj_str_from_vstr into bytes/str versions. 2022-08-26 16:43:55 +10:00
moducryptolib.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moductypes.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduhashlib.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduheapq.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modujson.c py/objstr: Optimise mp_obj_new_str_from_vstr for known-safe strings. 2022-08-26 16:44:35 +10:00
moduos.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
moduplatform.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
moduplatform.h extmod/moduplatform: Fix MSVC x86_64 check. 2022-11-18 15:13:00 +11:00
modurandom.c extmod/modurandom: Fix missing void in empty argument list. 2022-06-07 23:41:49 +10:00
modure.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduselect.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modusocket.c extmod/modnetwork: Use a type protocol to implement NIC functions. 2022-12-15 17:40:06 +11:00
modussl_axtls.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modussl_mbedtls.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modutimeq.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduwebsocket.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduwebsocket.h extmod/moduwebsocket: Refactor `websocket` to `uwebsocket`. 2019-02-14 00:35:45 +11:00
moduzlib.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modwebrepl.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
mpbthci.c extmod/modbluetooth: Refactor stack/hci/driver/port bindings. 2020-09-08 11:41:31 +10:00
mpbthci.h extmod/nimble: Add support for reading whole HCI UART packets. 2022-06-03 11:53:28 +10:00
network_cyw43.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
network_cyw43.h extmod: Add network-level class binding to cyw43 driver. 2019-06-03 16:47:35 +10:00
network_ninaw10.c extmod/modnetwork: Use a type protocol to implement NIC functions. 2022-12-15 17:40:06 +11:00
network_wiznet5k.c extmod/modnetwork: Use a type protocol to implement NIC functions. 2022-12-15 17:40:06 +11:00
uos_dupterm.c extmod: Add and reorganise compilation guards and includes. 2022-11-11 16:24:32 +11:00
utime_mphal.c extmod/utime_mphal: Make ticks_add check for overflow of delta. 2022-10-14 15:54:53 +11:00
utime_mphal.h extmod/utime_mphal: Add generic utime.time_ns() function. 2020-10-01 14:20:42 +10:00
vfs.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs.h py/builtin: Clean up and simplify import_stat and builtin_open config. 2022-05-25 13:04:45 +10:00
vfs_blockdev.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
vfs_fat.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs_fat.h extmod: Factor out block-device struct to make independent of fatfs. 2019-10-29 12:12:37 +11:00
vfs_fat_diskio.c tools/uncrustify: Enable more opts to remove space between func and '('. 2020-06-19 22:07:32 +10:00
vfs_fat_file.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs_lfs.c extmod: Add and reorganise compilation guards and includes. 2022-11-11 16:24:32 +11:00
vfs_lfs.h extmod: Add VFS littlefs bindings. 2019-10-29 14:17:29 +11:00
vfs_lfsx.c extmod: Add and reorganise compilation guards and includes. 2022-11-11 16:24:32 +11:00
vfs_lfsx_file.c extmod: Add and reorganise compilation guards and includes. 2022-11-11 16:24:32 +11:00
vfs_posix.c extmod/vfs_posix: Include errno.h and unistd.h headers. 2022-11-01 13:10:45 +11:00
vfs_posix.h extmod/vfs: Introduce a C-level VFS protocol, with fast import_stat. 2018-06-06 14:33:42 +10:00
vfs_posix_file.c extmod/vfs_posix_file: Implement finaliser for files. 2022-09-19 23:44:50 +10:00
vfs_reader.c extmod/vfs_reader: Fix mp_reader_new_file to open file in "rb" mode. 2020-08-12 23:40:50 +10:00
virtpin.c py/obj: Add accessors for type slots and use everywhere. 2022-09-19 19:06:07 +10:00
virtpin.h all: Unify header guard usage. 2017-07-18 11:57:39 +10:00