User manual
69
// all customer chapi devices have to be rebuilt with the new header file!!!
//
} chapi_out;
where:
#if !defined(__chapi_out_context_p)
typedef void * __chapi_out_context_p;
#endif // !defined(__chapi_out_context_p)
typedef void (CHAPI * __chapi_start_procedure_p)
(const struct __chapi_out * co);
typedef void (CHAPI * __chapi_stop_procedure_p)
(const struct __chapi_out * co);
typedef void (CHAPI * __chapi_reset_procedure_p)
(const struct __chapi_out * co);
typedef int (CHAPI * __chapi_read_procedure_p)
(const struct __chapi_out * co,
unsigned int addr,
bool is_byte);
typedef void (CHAPI * __chapi_write_procedure_p)
(const struct __chapi_out * co,
unsigned int addr,
int val,
bool is_byte);
// NOTE: THIS IS CHARON DEEP INTEGRATION
typedef void (CHAPI * __chapi_mapping_register_updated_p)
(const struct __chapi_out * co,
int reg_set, int reg_no, int val);
typedef int (CHAPI * __chapi_set_configuration_procedure_p)
(const struct __chapi_out * co,
const char * parameters);
typedef int (CHAPI * __chapi_set_configuration_ex_procedure_p)
(const struct __chapi_out * co);
typedef void (CHAPI * __chapi_setup_bus_requests_procedure_p)
(const struct __chapi_out * co);
typedef int (CHAPI * __chapi_run_interactive_command_procedure_p)
(const struct __chapi_out * co, const char *commandverb, char *parameters);
typedef unsigned int (CHAPI * __chapi_get_bus_address_range_procedure_p)
(const struct __chapi_out * co, supported_buses_t owning_bus_type);
The context field is defined by the CHAPI solely for use by the loadable component. The
CHARON core initializes the field with 0. Later it updates the field with the value returned
by the component initialization routine. Afterwards the CHARON core does not make any
attempts to use the value of the field in any way. The loadable component is supposed to
use the context field to bind the communication context to private data structures.
The b_address_range field contains the length of the I/O space in bytes the CHARON core
shall reserve for control and status registers of the device instance. The field is obligatory.
So the loadable component shall provide a non-zero value in this field when processing










