-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add status byte feature #40 #41
Conversation
- Added status_byte module in registers - Added get_last_chip_status_byte() API - Chip Status Byte is read on every SPI transaction
@dsvensson , can you link this PR with the issue #40 ? |
Agree with the naming change. But I wonder if |
Good point, I agree that |
src/lib.rs
Outdated
@@ -58,6 +58,11 @@ where | |||
Ok(Cc1101(lowlevel::Cc1101::new(spi)?)) | |||
} | |||
|
|||
/// Last Chip Status Byte | |||
pub fn get_last_chip_status_byte(&mut self) -> Option<StatusByte> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the name could be trimmed to get_last_chip_status
or get_chip_status
as get_last_chip_status_byte
kind of duplicates the return type without adding any meaning, and that it's the last is kind of assumed, but maybe keep last(?), and Option adds the meaning that it's maybe not available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can try to settle at get_chip_status
and hope that the return type and the doc comment clarify the full meaning of the function
status_byte.rs
module in registersget_last_chip_status_byte()
APIunrelated:
write_strobe
method name towrite_cmd_strobe
, this way it seems more intuitive