02:09
starblue1 has quit [Ping timeout: 240 seconds]
02:11
starblue1 has joined #rust-embedded
06:38
emerent has quit [Ping timeout: 250 seconds]
06:38
emerent has joined #rust-embedded
08:11
gsalazar has joined #rust-embedded
09:14
gsalazar_ has joined #rust-embedded
09:17
gsalazar has quit [Ping timeout: 256 seconds]
09:24
gsalazar_ has quit [Quit: Leaving]
09:25
gsalazar has joined #rust-embedded
10:55
starblue1 has quit [Ping timeout: 256 seconds]
10:57
starblue1 has joined #rust-embedded
12:45
_whitelogger has joined #rust-embedded
12:46
edm_ is now known as edm
12:46
darknighte_ is now known as darknighte
12:49
VShell is now known as Shell
12:50
rektide_ has quit [Ping timeout: 256 seconds]
12:51
rektide has joined #rust-embedded
13:48
cr1901_ is now known as cr1901
15:41
cr1901 has quit [Ping timeout: 240 seconds]
16:52
cr1901 has joined #rust-embedded
17:44
<
re_irc >
<@urbanaut78:matrix.org> Is there a place where I can find a description how to read an analog input pin? I'm using the Micro:bit v2.
17:52
<
re_irc >
<@urbanaut78:matrix.org> great, that's exactly what I'm using right now. but I would like to read m:B ring 0 (Pin0.02?) as input
17:52
<
re_irc >
<@k900:0upti.me> Looks like there's `board.pins.p0_02`
17:53
<
re_irc >
<@k900:0upti.me> And `board.pins.pX_YZ` in general
17:56
<
re_irc >
<@urbanaut78:matrix.org> In the example they also enable the microphone like this:
17:56
<
re_irc >
<@urbanaut78:matrix.org> board
17:56
<
re_irc >
<@urbanaut78:matrix.org> .microphone_pins
17:56
<
re_irc >
<@urbanaut78:matrix.org> // enable microphone
17:56
<
re_irc >
<@urbanaut78:matrix.org> do I need something similar?
17:57
<
re_irc >
<@k900:0upti.me> No
17:58
<
re_irc >
<@k900:0upti.me> That's to provide power to the microphone
17:58
<
re_irc >
<@k900:0upti.me> Whatever you're reading is probably powered externally
17:59
<
re_irc >
<@urbanaut78:matrix.org> ah, okay. that makes sense. thank you!
18:05
xnor has quit [Quit: leaving]
18:07
xnor has joined #rust-embedded
19:24
<
re_irc >
<@unrelentingtech:mozilla.org> which makes me think.. would it be possible to run all the C nimble stuff on the radio core and a Rust app on the other core, with the Rust app only knowing that "HCI" interface and them being independently built?
21:07
<
re_irc >
<@dirbaio:matrix.org> HCI is below the "host" part of the stack, so it's still quite lowlevel. The host part still needs certification
21:07
<
re_irc >
<@dirbaio:matrix.org> so you'd have to invent your own IPC that's above the host layer, ie not HCI
21:07
<
re_irc >
<@dirbaio:matrix.org> but otherwise yes, I guess..?
21:11
<
re_irc >
<@dirbaio:matrix.org> also huh, it has its own radio driver from scratch, using the registers directly. I wonder how mature it is
22:09
<
re_irc >
<@dirbaio:matrix.org> so, on the SPI ManagedCs traits
22:09
<
re_irc >
<@dirbaio:matrix.org> Would this make sense?
22:09
<
re_irc >
<@dirbaio:matrix.org> pub trait SpiDevice {
22:09
<
re_irc >
<@dirbaio:matrix.org> ```rust
22:09
<
re_irc >
<@dirbaio:matrix.org> type Transaction<'a>: spi::ReadWrite where Self: 'a;
22:09
<
re_irc >
<@dirbaio:matrix.org> fn transaction<'a>(&'a mut self) -> Result<Self::Transaction<'a>, Self::Error>;
22:09
<
re_irc >
<@dirbaio:matrix.org> }
22:09
<
re_irc >
<@dirbaio:matrix.org> `spi::ReadWrite` is the "classic" SPI trait that has read/write/transfer/etc
22:10
<
re_irc >
<@dirbaio:matrix.org> it represents "ownership over the bus"
22:10
<
re_irc >
<@dirbaio:matrix.org> while SpiDevice represents "ownership over a single SPI device in the (possibly shared) bus"
22:11
<
re_irc >
<@dirbaio:matrix.org> so you can't directly read/write to it, you "start a transaction", which locks the entire bus and lowers CS
22:11
<
re_irc >
<@dirbaio:matrix.org> then you can read/write/transfer etc on the Transaction, possibly multiple times
22:11
<
re_irc >
<@dirbaio:matrix.org> then you drop it, which automatically deasserts CS
22:12
<
re_irc >
<@dirbaio:matrix.org> what I like about it is you "explicitly" start the transaction, so you can do multiple reads/writes on it
22:13
<
re_irc >
<@dirbaio:matrix.org> so the Transactional traits to do "multiple operations within a single transaction" are no longer needed maybe...??