User manual

82
The example above shows that the CHARON core is not obliged to support the indicated
operation. It also indicates why the device instance should retain the chapi_in descriptor.
4.9.2 Set bus request
The operation of setting a bus request belongs to the group of operations previously called
“Request for bus interrupt”. Such an operation is initiated by the device instance when it is
in execution context synchronized to the CPU instruction interpretation thread. The
CHARON core is defined as the target of the operation. Actually the CPU instruction
interpretation thread is supposed to respond to the bus request.
In order to perform the operation, the initiator invokes a routine identified by the
set_bus_request field of the chapi_in descriptor supplying in the parameter brq_handle the
identifier of bus request to set. The procedure is invoked as follows:
brq_handle_t brq_handle;
const chapi_in * ci = …;
// Connect bus request to the bus getting brq_handle
if (ci->set_bus_request) {
ci->set_bus_request(ci, brq_handle);
}
The example above shows that the CHARON core is not obliged to support the indicated
operation. It also indicates why the device instance should remember the chapi_in
descriptor.
4.9.3 Clear bus request
The operation of clearing a bus request belongs to the group of operations previously
called “Request for bus interrupt”. Such an operation is initiated by the device instance
when it is in execution context synchronized to the CPU instruction interpretation thread.
The CHARON core is defined as the target of the operation. Actually the CPU instruction
interpretation thread is supposed to respond to the bus request clearing.
In order to perform the operation, the initiator invokes a routine identified by the
clear_bus_request field of the chapi_in descriptor supplying in the parameter brq_handle the
identifier of bus request to clear. The procedure is invoked as follows:
brq_handle_t brq_handle;
const chapi_in * ci = …;
// Connect bus request to the bus getting brq_handle
// Set bus request somewhere in the right place
if (ci->clear_bus_request) {
ci->clear_bus_request(ci, brq_handle);
}