microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
44 stars 25 forks source link

if it's possible to use MicroPython's native function, machine.spi? #164

Closed scarletwiz closed 10 months ago

scarletwiz commented 10 months ago

"Hello,

Currently, when using SPI on microbit, I use the functions from CODAL. However, I'm wondering if it's possible to use MicroPython's native function, machine.spi?

I would like to use the file micropython-microbit-v2\lib\micropython\extmod`network_wiznet5k.c`. This function uses nrf/spi related functions found in the MicroPython lib, not CODAL.

I'm in the middle of porting, and I've mostly resolved other issues, but the SPI function doesn't seem to connect properly. In the case of rp2 and stm, machine_spi.c related functions were created in the micropython\ports\stm32 directory, but I can't find similar code for nrf.

Should I create this myself? Or is there any example or issue I could refer to?"