SMI General.
Typedefs | |
typedef void(* | IOLM_SMI_CBGenericCnf) (IOLM_SMI_SHeader *psuHeader_p, INT8U *pu8ArgBlock_p) |
SMI Generic request confirmation callback. More... | |
typedef void(* | IOLM_SMI_CBLoadMasterIdentification) (INT16U *u16ArgBlockLength_p, INT8U *pu8ArgBlock_p) |
Load Master configuration callback. More... | |
typedef void(* | IOLM_SMI_CBLoadNVCfg) (INT8U u8Instance_p, INT8U *pu8Data_p, INT32U *pu32Length_p) |
Load configuration callback. More... | |
typedef void(* | IOLM_SMI_CBSaveNVCfg) (INT8U u8Instance_p, INT8U *pu8Data_p, INT32U u32Length_p) |
Save configuration callback. More... | |
typedef void(* | IOLM_SMI_CBSMIExt) (INT8U u8Instance_p, INT8U *pu8Data_p, INT16U u16Length_p) |
SMI extension function callback. More... | |
Functions | |
IOL_FUNC_DECL void | IOLM_SMI_vGenericReq (IOLM_SMI_SHeader *psuHeader_p, INT8U *pu8ArgBlock_p) |
SMI generic request. More... | |
IOL_FUNC_DECL void | IOLM_SMI_vSaveNvFinished (void) |
Save configuration finished. More... | |
void | IOLM_SMI_vExtRsp (IOL_EErrorType eError_p, INT8U *pu8Data_p, INT16U u16Length_p) |
SMI extension response. More... | |
IOL_FUNC_DECL void | IOLM_SMI_vRun (void) |
SMI Mainloop. More... | |
IOL_FUNC_DECL void | IOLM_SMI_vInit (IOLM_SMI_SCallbacks *psuCallbacks_p) |
Initialize SMI interface. More... | |
IOLM_SMI_CBGenericCnf |
SMI Generic request confirmation callback.
This callback function is called by the stack for a generic access of all services of the SMI. Confirmation to the IOLM_SMI_vGenericReq request.
[in] | psuHeader_p | Header. |
[in] | pu8ArgBlock_p | Generic ArgBlock. |
IOLM_SMI_CBLoadMasterIdentification |
Load Master configuration callback.
This callback service is called by the stack and requests the Master configuration from the application. Since this is hardware specific, it has to be implemented in the application code.
[in] | u16ArgBlockLength_p | Length of the ArgBlock. |
[in] | pu8ArgBlock_p | Data pointer which points to the Master identification (IOLM_SMI_SMasterident). |
IOLM_SMI_CBLoadNVCfg |
Load configuration callback.
This callback service is called by the stack and requests the saved configuration struct from non volatile memory. Since this is hardware specific, it has to be implemented in the application code.
[in] | u8Instance_p | 0-x for DataStorage Port and 0xFF for SMI configuration. |
[in] | pu8Data_p | Pointer to the configuration struct to be loaded (IOLM_SMI_SNVConfiguration). |
[in] | pu32Length_p | Pointer to the length of the configuration struct. |
IOLM_SMI_CBSaveNVCfg |
Save configuration callback.
This callback service is called by the stack and is used to save the configuration struct to non volatile memory. If this function is finished writing the data it must call IOLM_SMI_vSaveNvFinished to notify the stack. Since this is hardware specific, it has to be implemented in the application code.
[in] | u8Instance_p | 0-x for Data Storage port and 0xFF for SMI configuration. |
[in] | pu8Data_p | Pointer to the configuration struct to be saved (IOLM_SMI_SNVConfiguration). |
[in] | u32Length_p | Length of the configuration struct. |
IOLM_SMI_CBSMIExt |
SMI extension function callback.
Callback for extension functions which are proprietary and not included in the IOL/IOLW specification. Can be used for additional application specific services, firmware updates, etc. Since this is hardware specific, it has to be implemented in the application code.
[in] | u8Instance_p | Instance (defined by caller). |
[in] | pu8Data_p | Pointer to the response data. |
[in] | u16Length_p | Length of the response data |
void IOLM_SMI_vExtRsp | ( | IOL_EErrorType | eError_p, |
INT8U * | pu8Data_p, | ||
INT16U | u16Length_p | ||
) |
SMI extension response.
Responses of extension functions which are proprietary and not included in the IOL/IOLW specification.
[in] | eError_p | Error message as IOL_EErrorType. |
[in] | pu8Data_p | Pointer to the response data. |
[in] | u16Length_p | Length of the response data |
IOL_FUNC_DECL void IOLM_SMI_vGenericReq | ( | IOLM_SMI_SHeader * | psuHeader_p, |
INT8U * | pu8ArgBlock_p | ||
) |
SMI generic request.
The function is used for a generic access of all services of the SMI. The answer to this request is the callback function IOLM_SMI_CBGenericCnf.
[in] | psuHeader_p | Header. |
[in] | pu8ArgBlock_p | Generic ArgBlock. |
IOL_FUNC_DECL void IOLM_SMI_vInit | ( | IOLM_SMI_SCallbacks * | psuCallbacks_p | ) |
Initialize SMI interface.
Initializes the SMI Interface, sets initial values, loads saved configuration (if present), etc. Must be called once before SMI Mainloop (IOLM_SMI_vRun).
[in] | psuCallbacks_p | Set of callback functions. |
IOL_FUNC_DECL void IOLM_SMI_vRun | ( | void | ) |
SMI Mainloop.
Runs periodically to execute the next jobs in the queue, etc. Must be called at least once every millisecond to guarantee a stable stack environment.
IOL_FUNC_DECL void IOLM_SMI_vSaveNvFinished | ( | void | ) |
Save configuration finished.
This service needs to be called by the application code, to inform the stack, that the configuration is successfully written to the non volatile memory function in the application code (which can take a few hundred milliseconds).