starblue3 has joined #rust-embedded
starblue2 has quit [Ping timeout: 265 seconds]
<re_irc> <@j​ohn_socha:m​atrix.org> I just noticed that `embedded_hal::digital::v2::InputPin` is marked as unproven, but `OutputPin` is not. Is there a reason for this difference?
fabic has joined #rust-embedded
dcz has joined #rust-embedded
emerent_ has joined #rust-embedded
emerent_ is now known as emerent
<re_irc> <@e​ldruin:m​atrix.org> `InputPin` was not considered proven when it was first added to `embedded-hal`. It will be marked as proven in the next major release and can be considered proven now as well for all practical considerations.
<re_irc> <@e​ldruin:m​atrix.org> john_socha: I could not look much into detail but I would recommend you adding integration tests as well so that you can test what is actually sent over I2C. You can use `embedded-hal-mock` for that. Here [some examples](https://github.com/eldruin/lsm303agr-rs/blob/master/tests/integration.rs) that should not be...
<re_irc> ... too difficult to understand
<re_irc> <@h​enrik_alser:m​atrix.org> john_socha: Great job! 🙌 Some naming nits: consider prefixing your setter functions with ”set_” and maybe rename the functions that write to the display with ”write_” instead? As for the internal stuff, a more idiomatic way, that also provides a safe api would be to use enums (with value) instead...
<re_irc> ... of u8 for your commands and set_regs and do the bitmasking stuff in the command and set_reg functions instead so you can’t accidently write invalid stuff to the display. Or if you wanna keep it as you have now with u8 at least semantically these functions should be marked as unsafe.
fabic has quit [Ping timeout: 272 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 240 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 272 seconds]
_whitelogger has joined #rust-embedded
dcz has quit [Ping timeout: 252 seconds]
cyrozap has quit [Ping timeout: 272 seconds]
cyrozap has joined #rust-embedded