Search found 44 matches

by tannewt
Tue Sep 15, 2020 12:19 am
Forum: General Discussion and Questions
Topic: Advice for handling external memory in C modules
Replies: 5
Views: 240

Re: Advice for handling external memory in C modules

Many thanks for this, much food for thought. The best thing to do is to allocate the memory on the MicroPython heap with a bytearray object and then pass the bytearray into the object that takes it. That way the memory can be used again if you get more data. Do you mean ask the initial library to w...
by tannewt
Tue Aug 18, 2020 12:31 am
Forum: Development of MicroPython
Topic: Typesheds
Replies: 6
Views: 427

Re: Typesheds

In CircuitPython we used to convert our RST to pyi but now we have pyi directly. The autoapi extension is useful to generate the docs from the pyi: https://github.com/readthedocs/sphinx-autoapi
by tannewt
Mon Aug 17, 2020 11:32 pm
Forum: General Discussion and Questions
Topic: Advice for handling external memory in C modules
Replies: 5
Views: 240

Re: Advice for handling external memory in C modules

1) If the Python script doesn't need to access the individual bytes of the data chunk, can I avoid copying the data into and out of MicroPython's heap? Could I maybe package up the data chunk as a "bytes" object while it is outside of MicroPython's heap, or will this cause complications with the ga...
by tannewt
Wed May 27, 2020 12:47 am
Forum: Other Boards
Topic: [WeAct STM32F411CEU6] Avoiding “Volume was not properly unmounted” warnings
Replies: 8
Views: 1469

Re: [WeAct STM32F411CEU6] Avoiding “Volume was not properly unmounted” warnings

Typically the MicroPython or CircuitPython device can't do anything to get the Host OS to flush filesystem changes. It's really up to the user on the host OS to "eject" or "safely remove" the device before resetting.
by tannewt
Wed May 27, 2020 12:43 am
Forum: Development of MicroPython
Topic: Porting micropython to NXP LPC55S69
Replies: 3
Views: 1027

Re: Porting micropython to NXP LPC55S69

Hi Hugo, take a look at the SAMD port PR: https://github.com/micropython/micropyt ... d539a461fd

The LPC55 is supported by TinyUSB just like the SAMD so that side of things should be similar.
by tannewt
Tue Mar 10, 2020 12:08 am
Forum: ESP32 boards
Topic: Espressif announces ESP32-S2
Replies: 3
Views: 1654

Re: Espressif announces ESP32-S2

Espressif is planning on using TinyUSB in the ESP-IDF for the -S2 (https://github.com/hathach/tinyusb/pull/282) so adding basic support should be easier in MicroPython (which uses TinyUSB for SAMD and nRF) and CircuitPython (which uses TinyUSB for most ports.)
by tannewt
Tue Mar 10, 2020 12:02 am
Forum: General Discussion and Questions
Topic: Bluetooth `addr_type`?
Replies: 2
Views: 436

Re: Bluetooth `addr_type`?

My guess (haven't used it myself) is that it's an int value that matches the value in the BLE spec. Address types are usually "static public", "random static" (here is a Nordic post about it https://devzone.nordicsemi.com/f/nordic-q-a/2084/gap-address-types), or two others derived from the bonding k...
by tannewt
Tue Feb 18, 2020 4:42 am
Forum: Development of MicroPython
Topic: How to invoke own method from C?
Replies: 5
Views: 996

Re: How to invoke own method from C?

We recently ran this down in CircuitPython because we wanted native code to have access to the instance rather than just the native struct. (Our PixelBuf class calls `_transmit` on the subclass.) Here is the PR: https://github.com/adafruit/circuitpython/pull/2550 There was definitely work to make th...
by tannewt
Mon Jan 27, 2020 3:31 am
Forum: Other Boards
Topic: How to port Micropython to new Microcontroller
Replies: 13
Views: 4634

Re: How to port Micropython to new Microcontroller

Ok, I'm now attempting to do it myself... But being a beginner working with GIT I'm having some difficulties. I forked the repo and created a new branch: https://github.com/st-arnold/micropython/tree/same54 Modified/added files under ports (basically just copied all D51 stuff to E54 as a template a...
by tannewt
Mon Sep 23, 2019 8:36 pm
Forum: General Discussion and Questions
Topic: About MicroPython‘s trademark
Replies: 3
Views: 980

Re: About MicroPython‘s trademark

My understanding is that the MicroPython trademark is governed under the Python trademark that is owned by the Python Software Foundation. (This is true for CircuitPython as well.) I'll mention this to other's here at Adafruit and would encourage you to reach out to the PSF as well.