Search found 94 matches

by ttmetro
Wed Feb 17, 2021 10:42 pm
Forum: Other Boards
Topic: nrf52: external file system
Replies: 12
Views: 400

Re: nrf52: external file system

jimmo wrote:
Wed Feb 17, 2021 3:08 am
... different ISR handlers (pin, timer, network, socket, etc) can signal a given uevent slot.
Great! I'm looking forward to this, especially together with low power BT (nrf?) this will be fantastic.
by ttmetro
Wed Feb 17, 2021 1:14 am
Forum: Other Boards
Topic: nrf52: external file system
Replies: 12
Views: 400

Re: nrf52: external file system

But it's crazy inefficient because you have a task that has to burn a lot of time just polling that queue. Thanks for the note on ThreadSafeFlag; I'll use that for now. BTW: no need to poll for interrupt driven events. The latter wake up the CPU, after handling the ISR it proceeds right from where ...
by ttmetro
Tue Feb 16, 2021 5:30 pm
Forum: Other Boards
Topic: nrf52: external file system
Replies: 12
Views: 400

Re: nrf52: external file system

def irq(): asyncio.get_event_loop().call_soon_threadsafe(my_handler_task()) I'm looking forward to this functionality because I'd like a way to safely set a asyncio.Event from ISR context. I was not aware of call_soon_threadsafe ; would be great to have in MicroPython! Is this what uevent is about?...
by ttmetro
Fri Feb 12, 2021 7:16 pm
Forum: Other Boards
Topic: nrf52: external file system
Replies: 12
Views: 400

Re: nrf52: external file system

Yes, absolutely. I hope asyncio will eventually become a really convenient way of integrating sleep modes (especially light sleep). One of the main blockers to progress on this is coming up with a good way to integrate peripheral i/o with asyncio, and in general having a common path for ways for ta...
by ttmetro
Thu Feb 11, 2021 5:46 pm
Forum: Other Boards
Topic: nrf52: external file system
Replies: 12
Views: 400

Re: nrf52: external file system

We are keen to add more to the nRF port. In particular making it use the same modbluetooth API as the other ports is high on my radar. Definitely would welcome contributions to improve it. That's great to hear! I've submitted a small "trial" PR (https://github.com/micropython/micropython/pull/6753)...
by ttmetro
Thu Feb 11, 2021 3:21 am
Forum: Other Boards
Topic: nrf52: external file system
Replies: 12
Views: 400

Re: nrf52: external file system

You can use @pythoncoder's spi flash driver to connect a flash device on an spi bus and mount it as a drive. Works well. https://github.com/peterhinch/micropython_eeprom/tree/master/flash ... Thanks! I'll give this a try & see how far I'll get. The CircuitPython nrf port is much more full-featured,...
by ttmetro
Wed Feb 10, 2021 3:44 am
Forum: Other Boards
Topic: nrf52: external file system
Replies: 12
Views: 400

nrf52: external file system

Are external file systems (i.e. on an attached flash chip) supported for the nrf52?

The on-chip flash is only 1MBytes that are shared between the interpreter and user files. An external file system would leave more space for the interpreter.
by ttmetro
Mon Jan 18, 2021 5:44 pm
Forum: Development of MicroPython
Topic: serialize memoryview
Replies: 2
Views: 184

Re: serialize memoryview

jimmo wrote:
Mon Jan 18, 2021 4:47 am
ttmetro wrote:
Mon Jan 18, 2021 3:19 am
It this the correct approach or does a more appropriate api exist?
... calling mp_get_buffer will just give you back a buffer for any bytes-like type that you can directly serialise.
Perfect! I'm glad I asked.
Stupidly, I already used mp_get_buffer, but restricted it to bytes only.
by ttmetro
Mon Jan 18, 2021 3:19 am
Forum: Development of MicroPython
Topic: serialize memoryview
Replies: 2
Views: 184

serialize memoryview

I'm working on an msgpack serializer for micropython written in C. Python bytes objects map to the msgpack bin type and serializing those works fine. Now I would like the packer also to handle memoryviews of bytes (and bytearray) objects and wonder how to do this. Memoryviews are defined in in py/ob...
by ttmetro
Tue Jan 05, 2021 7:54 pm
Forum: Development of MicroPython
Topic: MicroPython and CircuitPython
Replies: 5
Views: 499

Re: MicroPython and CircuitPython

since I already have a fork of CircuitPython I cannot create another fork of MicroPython You can just fork MicroPython separately, clone it in a separate directory and copy your patch (a.k.a. changed files) to it and work as usual? Tried, but (1) github won't let me fork micropython since I already...