<luojia65[m]>
Hello! I have an I2C hardware that supports hardware sub-addresses. How should I write HAL to it using embedded-hal?
<luojia65[m]>
* hardware sub-addresses. That means I configure sub-address in one specific register, and it would be added to all the data I want to send. How should
emerent has quit [Ping timeout: 245 seconds]
emerent has joined #rust-embedded
<ryan-summers[m]>
<luojia65[m]> "Hello! I have an I2C hardware..." <- The e-h only supports 7 or 10 bit addressing schemes, so if you can use the subaddressing as the 10 bit scheme, it should be compatible. Otherwise, the e-h doesn't support more addressing schemes than that
crabbedhaloablut has joined #rust-embedded
duderonomy has joined #rust-embedded
FlixtheNewbie[m] has quit [Quit: Idle timeout reached: 172800s]
brazuca has quit [Quit: Client closed]
IlPalazzo-ojiisa has joined #rust-embedded
thejpster[m] has quit [Quit: Idle timeout reached: 172800s]
JonathanDickinso has joined #rust-embedded
<JonathanDickinso>
<luojia65[m]> "Hello! I have an I2C hardware..." <- Look into the transaction fns. Anything else wouldn't be standard I2C. Can you send the datasheet?
korken89[m] has quit [Quit: Idle timeout reached: 172800s]
ni has quit [Remote host closed the connection]
dngrsspookyvisio has quit [Quit: Idle timeout reached: 172800s]
TomB[m] has quit [Quit: Idle timeout reached: 172800s]
gauteh[m] has quit [Quit: Idle timeout reached: 172800s]
Guest7221 has left #rust-embedded [Error from remote client]
d3zd3z[m] has quit [Quit: Idle timeout reached: 172800s]
<adamgreig[m]>
dirbaio: any thoughts on heapless being re vs rec?
<adamgreig[m]>
japaric's happy to move it and volatile-register over to somewhere
dirbaio[m] has joined #rust-embedded
<dirbaio[m]>
r-e-c maybe?
<dirbaio[m]>
it's not a dep of any r-e crates
<dirbaio[m]>
and r-e crates are often stuff where the ecosystem benefits from there being one official crate doing $THING
<dirbaio[m]>
like, if there was two embedded-hals, that'd suck
<dirbaio[m]>
if there's two heaplesses, that's fine
<dirbaio[m]>
there's a lot of crates in r-e that are not strictly like that tho, so dunno
<dirbaio[m]>
on the other hand it might be nice to signal "this is THE crate you use for collections in embedded"
<dirbaio[m]>
heapless is already that
<dirbaio[m]>
we'd just be making it official
<dirbaio[m]>
(volatile-register probably to r-e if it's a dep of cortex-m, though I'd mark it as NRND)
<dirbaio[m]>
s/if/since/
<adamgreig[m]>
yea, I agree, can see either way for heapless except struggle to know which team it should be, not the first time we basically need a "libs" team
<dirbaio[m]>
then let's create it? :D
<adamgreig[m]>
are you volunteering? I'm up for the team, we'd need to work out how the line is drawn between "tools" like svd, "hal" like critical-section, but it would give us somewhere to put embedded-alloc and qemu-exit too
IlPalazzo-ojiisa has quit [Remote host closed the connection]
<adamgreig[m]>
but perhaps "contains library code beyond simple traits" and "runs on embedded targets" is a good enough line