1.2.6.4 Library Interface

USI service library provides the following interfaces:

Functions

NameDescription
SRV_USI_InitializeInitializes the specified USI service instance
SRV_USI_OpenOpens the specified USI service instance and returns a handle to it
SRV_USI_CloseCloses an opened-instance of the USI service
SRV_USI_StatusReturns the current status of the USI service
SRV_USI_CallbackRegisterRegisters a function to be called back when a new message is received and it belongs to the specified USI protocol
SRV_USI_TasksMaintains the USI's state machine
SRV_USI_Send_MessageSends a message through serial interface (USI)

Data types and constants

NameTypeDescription
SRV_USI_PROTOCOL_IDEnumList of available USI protocols
SRV_USI_STATUSEnumList of possible values of USI status
SRV_USI_HANDLETypedefHandle to an opened instance of the USI service
SRV_USI_HANDLE_INVALIDMacroDefinition of invalid USI handle
SRV_USI_CALLBACKTypedefPointer to an USI service callback function
SRV_USI_DEV_DESCStructContains the API required by the USI service to abstract from the hardware peripheral used
SRV_USI_INITStructContains the data required to initialize an instance of the USI service