Skip to content

Sound pressure api and [in progress]Proximity api#24

Open
adrianariton wants to merge 2 commits into
UPB-CS-OpenSourceUpstream:masterfrom
adrianariton:master
Open

Sound pressure api and [in progress]Proximity api#24
adrianariton wants to merge 2 commits into
UPB-CS-OpenSourceUpstream:masterfrom
adrianariton:master

Conversation

@adrianariton
Copy link
Copy Markdown

Implemented sound pressure api and also started the proximity API.

Copy link
Copy Markdown

@alexandruradovici alexandruradovici left a 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.

Comment thread Makefile

.PHONY: setup
setup: setup-qemu
setup: #setup-qemu
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this.

Comment thread apis/proximity/src/lib.rs
// Command IDs

const EXISTS: u32 = 0;
const READ_TEMP: u32 = 1; No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a newline

Comment thread apis/proximity/src/lib.rs
S::command(DRIVER_NUM, 1, 0, 0).to_result()
}

pub fn read_proximity_on_interrupt() -> Result<u32, ErrorCode> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub fn read_proximity_on_interrupt() -> Result<u32, ErrorCode> {
pub fn enable_interrupt() -> Result<u32, ErrorCode> {

Copy link
Copy Markdown

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.

Comment thread apis/proximity/src/lib.rs
S::command(DRIVER_NUM, EXISTS, 0, 0).to_result()
}

pub fn read_proximity() -> Result<u32, ErrorCode> {
Copy link
Copy Markdown

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.

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants