Skip to content
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

Project update 2 #1

Open
wants to merge 6 commits into
base: project_update_1
Choose a base branch
from
Open

Project update 2 #1

wants to merge 6 commits into from

Conversation

dwalkes
Copy link
Contributor

@dwalkes dwalkes commented Apr 22, 2019

No description provided.


/* perform a factory reset by erasing PS storage. This removes all the keys and other settings
that have been configured for this node */
gecko_cmd_flash_ps_erase_all();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PuneetBansal missing error checks.

init.flags= I2C_FLAG_WRITE;


ret=I2CSPM_Transfer(I2C0,&init);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PuneetBansal why use a blocking transfer here instead of interrupt driven?


/*Write operation to transfer slave address and type of data required*/
i2c_write(init,1);
timerWaitUs(10000);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PuneetBansal use a state machine for low power implementation, don't use inline waits here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This applies generally to inline waits below as well.

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