1
0
forked from me/IronOS

Return if read actually worked for fusb

This commit is contained in:
Ben V. Brown
2021-04-27 19:54:56 +10:00
parent db39d9ab2c
commit 9d2124387c
2 changed files with 4 additions and 4 deletions

View File

@@ -123,10 +123,10 @@ bool fusb_setup() {
return true; return true;
} }
void fusb_get_status(union fusb_status *status) { bool fusb_get_status(union fusb_status *status) {
/* Read the interrupt and status flags into status */ /* Read the interrupt and status flags into status */
fusb_read_buf(FUSB_STATUS0A, 7, status->bytes); return fusb_read_buf(FUSB_STATUS0A, 7, status->bytes);
} }
enum fusb_typec_current fusb_get_typec_current() { enum fusb_typec_current fusb_get_typec_current() {
@@ -154,4 +154,4 @@ bool fusb_read_id() {
if (version == 0 || version == 0xFF) if (version == 0 || version == 0xFF)
return false; return false;
return true; return true;
} }

View File

@@ -283,7 +283,7 @@ void fusb_send_hardrst();
/* /*
* Read the FUSB302B status and interrupt flags into *status * Read the FUSB302B status and interrupt flags into *status
*/ */
void fusb_get_status(union fusb_status *status); bool fusb_get_status(union fusb_status *status);
/* /*
* Read the FUSB302B BC_LVL as an enum fusb_typec_current * Read the FUSB302B BC_LVL as an enum fusb_typec_current