typedefvoid(*ARM_CAN_SignalUnitEvent_t)(uint32_tevent);///< Pointer to \ref ARM_CAN_SignalUnitEvent : Signal CAN Unit Event.
typedefvoid(*ARM_CAN_SignalObjectEvent_t)(uint32_tobj_idx,uint32_tevent);///< Pointer to \ref ARM_CAN_SignalObjectEvent : Signal CAN Object Event.
/**
\brief CAN Device Driver Capabilities.
*/
typedefstruct_ARM_CAN_CAPABILITIES{
uint32_tnum_objects:8;///< Number of \ref can_objects available
uint32_treentrant_operation:1;///< Support for reentrant calls to \ref ARM_CAN_MessageSend, \ref ARM_CAN_MessageRead, \ref ARM_CAN_ObjectConfigure and abort message sending used by \ref ARM_CAN_Control
uint32_tfd_mode:1;///< Support for CAN with flexible data-rate mode (CAN_FD) (set by \ref ARM_CAN_Control)
uint32_trestricted_mode:1;///< Support for restricted operation mode (set by \ref ARM_CAN_SetMode)
uint32_tmonitor_mode:1;///< Support for bus monitoring mode (set by \ref ARM_CAN_SetMode)
uint32_tinternal_loopback:1;///< Support for internal loopback mode (set by \ref ARM_CAN_SetMode)
uint32_texternal_loopback:1;///< Support for external loopback mode (set by \ref ARM_CAN_SetMode)
uint32_treserved:18;///< Reserved (must be zero)
}ARM_CAN_CAPABILITIES;
/**
\brief Access structure of the CAN Driver.
*/
typedefstruct_ARM_DRIVER_CAN{
ARM_DRIVER_VERSION(*GetVersion)(void);///< Pointer to \ref ARM_CAN_GetVersion : Get driver version.
ARM_CAN_CAPABILITIES(*GetCapabilities)(void);///< Pointer to \ref ARM_CAN_GetCapabilities : Get driver capabilities.
uint32_tbit_segments);///< Pointer to \ref ARM_CAN_SetBitrate : Set bitrate for CAN interface.
int32_t(*SetMode)(ARM_CAN_MODEmode);///< Pointer to \ref ARM_CAN_SetMode : Set operating mode for CAN interface.
ARM_CAN_OBJ_CAPABILITIES(*ObjectGetCapabilities)(uint32_tobj_idx);///< Pointer to \ref ARM_CAN_ObjectGetCapabilities : Retrieve capabilities of an object.
int32_t(*ObjectSetFilter)(uint32_tobj_idx,
ARM_CAN_FILTER_OPERATIONoperation,
uint32_tid,
uint32_targ);///< Pointer to \ref ARM_CAN_ObjectSetFilter : Add or remove filter for message reception.
int32_t(*ObjectConfigure)(uint32_tobj_idx,
ARM_CAN_OBJ_CONFIGobj_cfg);///< Pointer to \ref ARM_CAN_ObjectConfigure : Configure object.
int32_t(*MessageSend)(uint32_tobj_idx,
ARM_CAN_MSG_INFO*msg_info,
constuint8_t*data,
uint8_tsize);///< Pointer to \ref ARM_CAN_MessageSend : Send message on CAN bus.
int32_t(*MessageRead)(uint32_tobj_idx,
ARM_CAN_MSG_INFO*msg_info,
uint8_t*data,
uint8_tsize);///< Pointer to \ref ARM_CAN_MessageRead : Read message received on CAN bus.
int32_t(*Control)(uint32_tcontrol,
uint32_targ);///< Pointer to \ref ARM_CAN_Control : Control CAN interface.
ARM_CAN_STATUS(*GetStatus)(void);///< Pointer to \ref ARM_CAN_GetStatus : Get CAN status.
ARM_DRIVER_VERSION(*GetVersion)(void);///< Pointer to \ref ARM_I2C_GetVersion : Get driver version.
ARM_I2C_CAPABILITIES(*GetCapabilities)(void);///< Pointer to \ref ARM_I2C_GetCapabilities : Get driver capabilities.
int32_t(*Initialize)(ARM_I2C_SignalEvent_tcb_event);///< Pointer to \ref ARM_I2C_Initialize : Initialize I2C Interface.
int32_t(*Uninitialize)(void);///< Pointer to \ref ARM_I2C_Uninitialize : De-initialize I2C Interface.
int32_t(*PowerControl)(ARM_POWER_STATEstate);///< Pointer to \ref ARM_I2C_PowerControl : Control I2C Interface Power.
int32_t(*MasterTransmit)(uint32_taddr,constuint8_t*data,uint32_tnum,boolxfer_pending);///< Pointer to \ref ARM_I2C_MasterTransmit : Start transmitting data as I2C Master.
int32_t(*MasterReceive)(uint32_taddr,uint8_t*data,uint32_tnum,boolxfer_pending);///< Pointer to \ref ARM_I2C_MasterReceive : Start receiving data as I2C Master.
int32_t(*SlaveTransmit)(constuint8_t*data,uint32_tnum);///< Pointer to \ref ARM_I2C_SlaveTransmit : Start transmitting data as I2C Slave.
int32_t(*SlaveReceive)(uint8_t*data,uint32_tnum);///< Pointer to \ref ARM_I2C_SlaveReceive : Start receiving data as I2C Slave.
int32_t(*GetDataCount)(void);///< Pointer to \ref ARM_I2C_GetDataCount : Get transferred data count.
int32_t(*Control)(uint32_tcontrol,uint32_targ);///< Pointer to \ref ARM_I2C_Control : Control I2C Interface.
ARM_I2C_STATUS(*GetStatus)(void);///< Pointer to \ref ARM_I2C_GetStatus : Get I2C status.
#define ARM_SAI_FRAME_LENGTH(n) ((((n)-1)&0x3FFU) << ARM_SAI_FRAME_LENGTH_Pos) ///< Frame length in bits (8..1024); default depends on protocol and data
/*----- SAI Configuration (arg1): Frame Sync Width -----*/
#define ARM_SAI_FRAME_SYNC_POLARITY_HIGH (0U << ARM_SAI_FRAME_SYNC_POLARITY_Pos) ///< Frame Sync is active high (default); User Protocol only (ignored otherwise)
#define ARM_SAI_FRAME_SYNC_POLARITY_LOW (1U << ARM_SAI_FRAME_SYNC_POLARITY_Pos) ///< Frame Sync is active low; User Protocol only (ignored otherwise)
/*----- SAI Configuration (arg1): Frame Sync Early -----*/
#define ARM_SAI_FRAME_SYNC_EARLY (1U << 19) ///< Frame Sync one bit before the first bit of the frame; User Protocol only (ignored otherwise)
/*----- SAI Configuration (arg1): Slot Count -----*/
#define ARM_SAI_SLOT_COUNT(n) ((((n)-1)&0x1FU) << ARM_SAI_SLOT_COUNT_Pos) ///< Number of slots in frame (1..32); default=1; User Protocol only (ignored otherwise)
/*----- SAI Configuration (arg1): Slot Size -----*/
#define ARM_SAI_SLOT_OFFSET(n) (((n)&0x1FU) << ARM_SAI_SLOT_OFFSET_Pos) ///< Offset of first data bit in slot (0..31); default=0; User Protocol only (ignored otherwise)
/****** SAI Configuration (arg2) *****/
/*----- SAI Control Codes: Configuration Parameters: Audio Frequency (Master only) -----*/
#define ARM_SAI_AUDIO_FREQ_Msk (0x0FFFFFU) ///< Audio frequency mask
/*----- SAI Control Codes: Configuration Parameters: Master Clock Prescaler (Master only and MCLK Pin) -----*/
typedefvoid(*ARM_USBD_SignalDeviceEvent_t)(uint32_tevent);///< Pointer to \ref ARM_USBD_SignalDeviceEvent : Signal USB Device Event.
typedefvoid(*ARM_USBD_SignalEndpointEvent_t)(uint8_tep_addr,uint32_tevent);///< Pointer to \ref ARM_USBD_SignalEndpointEvent : Signal USB Endpoint Event.
/**
\brief USB Device Driver Capabilities.
*/
typedefstruct_ARM_USBD_CAPABILITIES{
uint32_tvbus_detection:1;///< VBUS detection
uint32_tevent_vbus_on:1;///< Signal VBUS On event
uint32_tevent_vbus_off:1;///< Signal VBUS Off event
uint32_treserved:29;///< Reserved (must be zero)
}ARM_USBD_CAPABILITIES;
/**
\brief Access structure of the USB Device Driver.
*/
typedefstruct_ARM_DRIVER_USBD{
ARM_DRIVER_VERSION(*GetVersion)(void);///< Pointer to \ref ARM_USBD_GetVersion : Get driver version.
ARM_USBD_CAPABILITIES(*GetCapabilities)(void);///< Pointer to \ref ARM_USBD_GetCapabilities : Get driver capabilities.
ARM_USBD_SignalEndpointEvent_tcb_endpoint_event);///< Pointer to \ref ARM_USBD_Initialize : Initialize USB Device Interface.
int32_t(*Uninitialize)(void);///< Pointer to \ref ARM_USBD_Uninitialize : De-initialize USB Device Interface.
int32_t(*PowerControl)(ARM_POWER_STATEstate);///< Pointer to \ref ARM_USBD_PowerControl : Control USB Device Interface Power.
int32_t(*DeviceConnect)(void);///< Pointer to \ref ARM_USBD_DeviceConnect : Connect USB Device.
int32_t(*DeviceDisconnect)(void);///< Pointer to \ref ARM_USBD_DeviceDisconnect : Disconnect USB Device.
ARM_USBD_STATE(*DeviceGetState)(void);///< Pointer to \ref ARM_USBD_DeviceGetState : Get current USB Device State.
int32_t(*DeviceRemoteWakeup)(void);///< Pointer to \ref ARM_USBD_DeviceRemoteWakeup : Trigger USB Remote Wakeup.
int32_t(*DeviceSetAddress)(uint8_tdev_addr);///< Pointer to \ref ARM_USBD_DeviceSetAddress : Set USB Device Address.
int32_t(*ReadSetupPacket)(uint8_t*setup);///< Pointer to \ref ARM_USBD_ReadSetupPacket : Read setup packet received over Control Endpoint.
int32_t(*EndpointConfigure)(uint8_tep_addr,
uint8_tep_type,
uint16_tep_max_packet_size);///< Pointer to \ref ARM_USBD_EndpointConfigure : Configure USB Endpoint.
int32_t(*EndpointUnconfigure)(uint8_tep_addr);///< Pointer to \ref ARM_USBD_EndpointUnconfigure : Unconfigure USB Endpoint.
int32_t(*EndpointStall)(uint8_tep_addr,boolstall);///< Pointer to \ref ARM_USBD_EndpointStall : Set/Clear Stall for USB Endpoint.
int32_t(*EndpointTransfer)(uint8_tep_addr,uint8_t*data,uint32_tnum);///< Pointer to \ref ARM_USBD_EndpointTransfer : Read data from or Write data to USB Endpoint.
uint32_t(*EndpointTransferGetResult)(uint8_tep_addr);///< Pointer to \ref ARM_USBD_EndpointTransferGetResult : Get result of USB Endpoint transfer.
int32_t(*EndpointTransferAbort)(uint8_tep_addr);///< Pointer to \ref ARM_USBD_EndpointTransferAbort : Abort current USB Endpoint transfer.
uint16_t(*GetFrameNumber)(void);///< Pointer to \ref ARM_USBD_GetFrameNumber : Get current USB Frame Number.
typedefvoid(*ARM_USBH_SignalPortEvent_t)(uint8_tport,uint32_tevent);///< Pointer to \ref ARM_USBH_SignalPortEvent : Signal Root HUB Port Event.
typedefvoid(*ARM_USBH_SignalPipeEvent_t)(ARM_USBH_PIPE_HANDLEpipe_hndl,uint32_tevent);///< Pointer to \ref ARM_USBH_SignalPipeEvent : Signal Pipe Event.
#define ARM_USBH_SignalEndpointEvent_t ARM_USBH_SignalPipeEvent_t /* Legacy name */
/**
\brief USB Host Driver Capabilities.
*/
typedefstruct_ARM_USBH_CAPABILITIES{
uint32_tport_mask:15;///< Root HUB available Ports Mask