pub trait ControllerClient {
// Required methods
fn state_changed(&self, state: State);
fn enabled(&self, status: Result<(), ErrorCode>);
fn disabled(&self, status: Result<(), ErrorCode>);
}Expand description
Client interface for capsules that implement the Controller trait.
Required Methods§
Sourcefn state_changed(&self, state: State)
fn state_changed(&self, state: State)
The driver calls this function when the state of the CAN peripheral is changed.
§Arguments:
state- The current state of the peripheral
Sourcefn enabled(&self, status: Result<(), ErrorCode>)
fn enabled(&self, status: Result<(), ErrorCode>)
The driver calls this function when the peripheral has been successfully
enabled. The driver must call this function and state_changed also,
but must wait for this function to be called. If an error occurs, the
state_changed callback might not be able to report it.
§Arguments:
statusOk()- The peripheral has been successfully enabled; the actual state is transmitted viastate_changedcallbackErr(ErrorCode)- The error that occurred during the enable process
Sourcefn disabled(&self, status: Result<(), ErrorCode>)
fn disabled(&self, status: Result<(), ErrorCode>)
The driver calls this function when the peripheral has been successfully
disabled. The driver must call this function and state_changed also,
but must wait for this function to be called. If an error occurs, the
state_changed callback might not be able to report it.
§Arguments:
statusOk()- The peripheral has been successfully disabled; the actual state is transmitted viastate_changedcallbackErr(ErrorCode)- The error that occurred during the disable process