Write operations
The thread initiates a write operation when it must deliver a message to the system on the other end of a driver’s line.
- The device moves to the WRITING state
and invokes the Tcl procedure
hci_pd.write
. - The write procedure uses
hci_pd_send
to set up callbacks when the data is written. - The
hci_pd.write
procedure sets up for an output (I/O) operation on the driver’s device. - When the Tcl function returns, the PDL writes out the phrase.
When all the data is written or an error happens, the engine invokes the
appropriate Tcl continuation procedure specified in the invocation to hci_pd_send
.
This process may repeat.
When a Tcl fragment returns without initiating an I/O operation, the protocol driver:
- Considers the operation complete.
- Informs the system of the complex operation.
- Returns the driver to the IDLE state.