Return if read actually worked for fusb
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user