-
Notifications
You must be signed in to change notification settings - Fork 9
Sound pressure api and [in progress]Proximity api #24
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
base: master
Are you sure you want to change the base?
Sound pressure api and [in progress]Proximity api #24
Conversation
alexandruradovici
left a comment
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.
Please split this into separate pull requests. There are already some open pull requests about this, maybe you can contribute to those.
|
|
||
| .PHONY: setup | ||
| setup: setup-qemu | ||
| setup: #setup-qemu |
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.
Please revert this.
| // Command IDs | ||
|
|
||
| const EXISTS: u32 = 0; | ||
| const READ_TEMP: u32 = 1; No newline at end of file |
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.
Add a newline
| S::command(DRIVER_NUM, 1, 0, 0).to_result() | ||
| } | ||
|
|
||
| pub fn read_proximity_on_interrupt() -> Result<u32, ErrorCode> { |
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.
| pub fn read_proximity_on_interrupt() -> Result<u32, ErrorCode> { | |
| pub fn enable_interrupt() -> Result<u32, ErrorCode> { |
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.
Add a comment explaining how this function works.
| S::command(DRIVER_NUM, EXISTS, 0, 0).to_result() | ||
| } | ||
|
|
||
| pub fn read_proximity() -> Result<u32, ErrorCode> { |
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.
Add a comment explaining how this function works.
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.
These tests are for the temperature.
Implemented
sound pressureapi and also started theproximityAPI.