//***************************************************************************** // (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 UniHwAbstract.h /// /// \author f24301c [mailto:walker.lv@marelli.com] /// /// \date 05.27.2024 /// /// \brief define Uart abstraction layer API /// // ---------------------------------------------------------------------------- #ifndef _UNIHW_ABSTRACT_H_ #define _UNIHW_ABSTRACT_H_ //============================================================================= // Includes //============================================================================= #include #include //#include //============================================================================= // Defines and Typedef //============================================================================= // Gpt accept timer tick as unit. in this implementation, 1 tick = 1us // NOTENOTE: should this be move to UnitUartCfg.h? #define TimerAbs_MicroSecond_2_Tick(us) ((Gpt_ValueType)(us)) //----------------------------------------------------------------------------- // Start declaration or definitions of functions //----------------------------------------------------------------------------- extern uint32 UartAbs_Write(UniUartHandle handle, uint8* const txBuf, uint16 txLen); extern uint32 UartAbs_Read(UniUartHandle handle, uint8* const rxBuf, uint16 rxLen); extern void UartAbs_Abort(UniUartHandle handle); extern BusState_t UartAbs_GetState(UniUartHandle handle); extern UUE_ErrorType UartAbs_Init(UniUartHandle handle, const UartCommParam_t* parameter); extern void TimerAbs_Start(UniTimerHandle handle, uint32 microSecond); extern void TimerAbs_Stop(UniTimerHandle handle); //----------------------------------------------------------------------------- // End declaration or definitions of functions //----------------------------------------------------------------------------- #endif // _UNIHW_ABSTRACT_H_