//***************************************************************************** // (C) Automotive Lighting China // // Automotive Lighting Reutlingen GmbH owns all the rights to this work. // This work shall not be copied, reproduced, used, modified, transferred // or its information shall not be disclosed without the prior written // authorization of Automotive Lighting China. //***************************************************************************** // ---------------------------------------------------------------------------- /// \file UniUartError.h /// /// \author f24301c [mailto:walker.lv@marelli.com] /// /// \date 05.27.2024 /// /// \brief defines all public error number return from API /// // ---------------------------------------------------------------------------- #ifndef _UNI_UART_ERROR_H_ #define _UNI_UART_ERROR_H_ #include //============================================================================= // Defines and Typedef //============================================================================= typedef uint32 UUE_ErrorType; #if (UUE_ASSERT_ENABLE == STD_ON) # if defined (BRS_COMP_TASKING) #pragma warning 557 // remove infinite loop warning #endif //extern void UUE_ASSERT(uint8 exp); static inline void UUE_ASSERT(uint8 exp) { if (!(exp)) while (1); } # if defined (BRS_COMP_TASKING) #pragma warning restore #endif #else #define UUE_ASSERT(exp) #endif #if (UUE_DEBUG_BREAK_ENABLE == STD_ON) static inline void UUE_DEBUG_BREAK() { // CPUx.DBGSR.DE should be 1 __asm ("debug"); } #else #define UUE_DEBUG_BREAK() #endif // define Unify Uart Engine(UUE) error number #define E_UUE_NO_ERROR 0 #define E_UUE_UARTENG_BASED ((UUE_ErrorType)(1)) #define E_UUE_NOT_SUPPORT (E_UUE_NO_ERROR + 0) #define E_UUE_BAD_PARAMETER (E_UUE_NO_ERROR + 1) #define E_UUE_CHANNEL_NOT_INIT (E_UUE_NO_ERROR + 10) /* channel busState invalid */ #define E_UUE_CHANNEL_NOT_CONFIG (E_UUE_NO_ERROR + 11) /* channel busState invalid */ #define E_UUE_UARGENG_INTERNAL (E_UUE_NO_ERROR + 20) // static ring queue error code #define E_UUE_QUEUE_BASED ((UUE_ErrorType)(100)) #define E_UUE_QUEUE_FULL (E_UUE_QUEUE_BASED + 0) #define E_UUE_INVD_OPERATION (E_UUE_QUEUE_BASED + 1) #define E_UUE_QUEUE_INTACT (E_UUE_QUEUE_BASED + 5) /* Queue internal error, data not intact */ // Pdu relative error #define E_UUE_PDU_BASE ((UUE_ErrorType)(200)) #define E_UUE_PDU_NO_PAYLOAD (E_UUE_PDU_BASE + 0) /* no valid payload in pdu */ // slave device type Tps929x errors #define E_UUE_TPS929_BASED ((UUE_ErrorType)(300)) //global response buffer not found, possible configuration error #define E_UUE_TPS929_RESPBUFF_NOT_FOUND ((UUE_ErrorType)(300) + 0) #endif // _UNI_UART_ERROR_H_