!dASuPAbUCerhCYFqJs:matrix.org

nRF Rust

140 Members
Discussion medium for the nRF-rs organization on Github14 Servers

Load older messages


SenderMessageTime
29 Nov 2021
@thalesfragoso:matrix.orgthalesfragosotokio_uring does the same thing btw, moving the `Vec`s back and forth02:18:04
@thalesfragoso:matrix.orgthalesfragosoKinda sad, but what can you do .-.02:18:19
@jamesmunns:beeper.comJames Munnshuh. I generally like it :D02:18:38
@thalesfragoso:matrix.orgthalesfragosoYeah, it's a bit easier with a heapless::Pool02:19:22
@jamesmunns:beeper.comJames MunnsI've used it in a couple different ways, with bbqueue, byte-slab, and heapless::Pool02:19:22
@jamesmunns:beeper.comJames Munnsbut honestly, without SOME kind of safe memory management tool, DMA is a TERRIBLE idea.02:19:47
@thalesfragoso:matrix.orgthalesfragosoBut then you have the slice problem, where you have to new-type over your pool type to send/recv just part of it02:20:02
@thalesfragoso:matrix.orgthalesfragosoI guess once you do with async you kinda feels embedded-dma a bit clunky02:20:38
@jamesmunns:beeper.comJames MunnsYeah, fair02:20:46
@jamesmunns:beeper.comJames Munns
In reply to @thalesfragoso:matrix.org
But then you have the slice problem, where you have to new-type over your pool type to send/recv just part of it
Hmm, how did I do this in byte-slab...
02:21:06
@thalesfragoso:matrix.orgthalesfragosoBut like I said, even tokio_uring has to deal with this stuff02:21:09
@jamesmunns:beeper.comJames Munnsoh02:22:16
@jamesmunns:beeper.comJames Munnslol02:22:17
@thalesfragoso:matrix.orgthalesfragosoOne of the advantages is that it plays very nicely with timeout and such (async)02:22:18
@jamesmunns:beeper.comJames MunnsI wrote my own raw PAC driver02:22:24
@jamesmunns:beeper.comJames Munnshttps://github.com/anachro-rs/powerbus/blob/main/uarte-485/src/lib.rs#L309-L37502:22:25
@jamesmunns:beeper.comJames Munnsso uh, I take back what I said02:22:43
@jamesmunns:beeper.comJames MunnsI HAVE used embedded-dma with heapless::pool and bbqueue, but I guess I bailed here.02:23:05
@firefrommoonlight:matrix.orgfirefrommoonlight
In reply to @jamesmunns:beeper.com
but honestly, without SOME kind of safe memory management tool, DMA is a TERRIBLE idea.
I'm not discounting your argument, but an alternative take: Not using DMA when you're transmitting a significant amount of data (or continuous data) is a bad idea, likewise bringing in too many dependencies
02:26:58
@jamesmunns:beeper.comJames MunnsThose seem like separate takes, neither of which contradict my claim02:27:34
@firefrommoonlight:matrix.orgfirefrommoonlightEach dependency you add seems innocent, but the mental and maintenance overhead (Keeping up with APIs etc) adds up02:27:48
@firefrommoonlight:matrix.orgfirefrommoonlightSo whenever there's a way to do something without a dep, I think it's important to be careful02:28:03
@jamesmunns:beeper.comJames Munnsman, I don't want to get into a purity test02:28:08
@jamesmunns:beeper.comJames Munnsthat being said, while anachro is me "rewriting the world from scratch", dependencies are neither good nor bad in my opinion02:28:36
@jamesmunns:beeper.comJames MunnsALL code is liability02:28:40
@firefrommoonlight:matrix.orgfirefrommoonlightYou made a very strong claim02:28:47
@jamesmunns:beeper.comJames Munnsand honestly, there are a LOT of smarter people than me in the rust ecosystem02:28:55
@jamesmunns:beeper.comJames Munns10 days out of 10, I trust Jorge to get memory management more right than me.02:29:24
@jamesmunns:beeper.comJames MunnsI would not rewrite something he wrote, just to avoid a dep.02:29:39
@badrb:matrix.orgbadrb
In reply to @jamesmunns:beeper.com
https://github.com/anachro-rs/powerbus/blob/main/uarte-485/src/lib.rs#L309-L375
I ended up implementing something very similar.
I had to edit the hal to add a few functions and implement the ppi+timer logic in my application code.
Why do you think your implementation is too specific?
15:59:33

There are no newer messages yet.


Back to Room List