Closed Andrei-Basarab closed 5 months ago
@dsvensson , can you link this PR with the issue https://github.com/dsvensson/cc1101/issues/40 ?
Agree with the naming change. But I wonder if status
should perhaps be a core::option::Option that's set to None on write_cmd_strobe as that invalidates the current status, and None also better represents the initial state.
Good point, I agree that Option<StatusByte>
might be a better type for status and a more generic approach for the initial data.
Regarding sending of write_cmd_strobe()
, not all commands have the same effect, and we shall receive the last status before executing the command.
Still, perhaps for state freshness and the user's peace of mind, we can simplify the behavior of setting it to None
.
I will try to implement it later today.
status_byte.rs
module in registersget_last_chip_status_byte()
APIunrelated:
write_strobe
method name towrite_cmd_strobe
, this way it seems more intuitive