dsvensson / cc1101

A platform agnostic driver to interface with the CC1101 (Sub-1GHz RF Transceiver)
Apache License 2.0
33 stars 18 forks source link

Add status byte feature #40 #41

Closed Andrei-Basarab closed 5 months ago

Andrei-Basarab commented 5 months ago

unrelated:

Andrei-Basarab commented 5 months ago

@dsvensson , can you link this PR with the issue https://github.com/dsvensson/cc1101/issues/40 ?

dsvensson commented 5 months ago

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.

Andrei-Basarab commented 5 months ago

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.