Wykres commitów

8 Commity (94beeabd2ee179d587942046555833e022241f24)

Autor SHA1 Wiadomość Data
Jim Mussared 94beeabd2e py/obj: Convert make_new into a mp_obj_type_t slot.
Instead of being an explicit field, it's now a slot like all the other
methods.

This is a marginal code size improvement because most types have a make_new
(100/138 on PYBV11), however it improves consistency in how types are
declared, removing the special case for make_new.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-19 19:06:15 +10:00
Jim Mussared 9dce82776d all: Remove unnecessary locals_dict cast.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-19 19:06:01 +10:00
Jim Mussared 662b9761b3 all: Make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE.
In preparation for upcoming rework of mp_obj_type_t layout.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-19 19:06:01 +10:00
David Lechner a316a8fdb3 mimxrt: Use MP_REGISTER_ROOT_POINTER().
This uses MP_REGISTER_ROOT_POINTER() to register all port-specific root
pointers in the mimxrt port.

Signed-off-by: David Lechner <david@pybricks.com>
2022-07-18 13:50:34 +10:00
robert-hh a0432ed9cb mimxrt: Update port to work with new nxp_driver v2.10.
The nxp_driver v2.10 allows for/requires some changes to the code:

- Remove some part of pwm_backlog.*, which is provided by the lib now.
- Change eth.c: the newer versions have additional parameters of the
  library versions.
- Change sdcard.c: use TransferBlocking instead of TransferNonblocking.
- Add some support for the MIMXRT1176 device.
- Set the clocks for UART, I2C, Timer.
- Integrate the I2S module and fix a rebase error.
- Use blocking transfer only for SPI.  It's faster and interferes less with
  other modules.
- Use the clock_config.c files of library v2.8.5.  The mimxrt files keeps
  the clock_config.c files from Verson 2.8.5.  With clock_config.c from
  v2.10, the boards do not work.  Refactoring of the clock set-up is on the
  to-do list.
- Enable expiry timers for UART, I2C and SPI, avoiding a stall in library
  code.
- The clock_config.* files are moved from the board-specific directories to
  the boards directory and given a MCU related name.
2022-06-03 10:48:49 +10:00
robert-hh d79105d7c0 mimxrt/machine_timer: Leave the Timer clock source at IPG clock.
Setting it to OSC_CLK interferes the utime module's functionality.  This is
still an area demanding an understanding.
2021-06-03 13:03:02 +10:00
robert-hh cdd95ce737 mimxrt/machine_timer: Reuse any existing timer objects.
So there is a 1-1 mapping of hardware timer to Python object.
2021-06-03 13:02:51 +10:00
robert-hh 4c407c790f mimxrt: Add the Timer class to the machine module.
It supports three hardware timer channels based on the PIT timers of the
MIMXRT MCU.  The timer id's are 0, 1 and 2.  On soft reboot all active
timers will be stopped via finalisers.
2021-06-02 00:33:13 +10:00