ZHCUBW5 April 2024
其为包含所有可能返回的状态代码的主类型。
typedef enum
{
Fapi_Status_Success=0, /* Function completed successfully */
Fapi_Status_FsmBusy, /* FSM is Busy */
Fapi_Status_FsmReady, /* FSM is Ready */
Fapi_Status_AsyncBusy, /* Async function operation is Busy */
Fapi_Status_AsyncComplete, /* Async function operation is Complete */
Fapi_Error_Fail=500, /* Generic Function Fail code */
Fapi_Error_StateMachineTimeout, /* State machine polling never returned ready and timed out */
Fapi_Error_OtpChecksumMismatch, /* Returned if OTP checksum does not match expected value */
Fapi_Error_InvalidDelayValue, /* Returned if the Calculated RWAIT value exceeds 15 -
Legacy Error */
Fapi_Error_InvalidHclkValue, /* Returned if FClk is above max FClk value -
FClk is a calculated from SYSCLK and RWAIT */
Fapi_Error_InvalidCpu, /* Returned if the specified Cpu does not exist */
Fapi_Error_InvalidBank, /* Returned if the specified bank does not exist */
Fapi_Error_InvalidAddress, /* Returned if the specified Address does not exist in Flash
or OTP */
Fapi_Error_InvalidReadMode, /* Returned if the specified read mode does not exist */
Fapi_Error_AsyncIncorrectDataBufferLength,
Fapi_Error_AsyncIncorrectEccBufferLength,
Fapi_Error_AsyncDataEccBufferLengthMismatch,
Fapi_Error_FeatureNotAvailable, /* Flash Wrapper feature is not available on this device */
Fapi_Error_FlashRegsNotWritable, /* Returned if Flash registers are not writable due to
security */
Fapi_Error_InvalidCPUID, /* Returned if OTP has an invalid CPUID */
} ATTRIBUTE_PACKED Fapi_StatusType;