#if KOS_MEMORY_MAPPING == STD_ON FUNC(COMServiceIdType, OSEK_COM_CODE) COMErrorGetServiceId(void) #else COMServiceIdType COMErrorGetServiceId(void) #endif /* KOS_MEMORY_MAPPING */ { /* Return value: Service Identifier. */ /* return (COMServiceIdType)0; */ } #if KOS_MEMORY_MAPPING == STD_ON FUNC(void, OSEK_COM_CODE) ComIf_UpdateAndNotifyReceivers( CONSTP2CONST(Com_MessageObjectType, AUTOMATIC, OSEK_COM_APPL_DATA) MessageSendObject, ApplicationDataRef DataRef ) #else void ComIf_UpdateAndNotifyReceivers(Com_MessageObjectType const * const MessageSendObject, ApplicationDataRef DataRef ) #endif /* KOS_MEMORY_MAPPING */ { uint8 idx; Com_MessageObjectType const * MessageObject; #if defined(OS_EXTENDED_STATUS) && defined(OS_USE_CALLEVEL_CHECK) OsCallevelType CallevelSaved; #endif
#include "tpl_com_queue.h" #define OS_START_SEC_CODE #include "tpl_memmap.h" /*! * \brief Returns a pointer to the queue element that * is available for a write operation * * @param queue pointer to a queue * * @return a pointer of the available element * for write in the queue or NULL if there * is no space. */ FUNC(tpl_com_data, OS_CODE) *tpl_queue_element_for_write( CONSTP2CONST(tpl_queue, AUTOMATIC, OS_CONST) queue) { CONSTP2CONST(tpl_queue_dyn, AUTOMATIC, OS_VAR) dq = queue->dyn_desc; CONST(uint32, AUTOMATIC) offset = dq->index + dq->size; /* check the queue is not full */ if ((queue->max_size - dq->size) >= queue->element_size) { /* return the pointer where the write will occur */ return queue->buffer + ((offset < queue->max_size) ? (offset) : (offset - queue->max_size)); } else { return NULL; }
#include "tpl_os_action.h" #include "tpl_os_kernel.h" #include "tpl_machine_interface.h" #include "tpl_os_definitions.h" #include "tpl_com_base_mo.h" #include "tpl_com_definitions.h" #include "tpl_com_notification.h" #define OS_START_SEC_CODE #include "tpl_memmap.h" /** * action function for action set flag */ FUNC(void, OS_CODE) tpl_action_setflag( CONSTP2CONST(tpl_action, AUTOMATIC, OS_CONST) action) { /* * A tpl_action * is cast to a tpl_callback_action * * This violate MISRA rule 45. However, since the * first member of tpl_flag_action * is a tpl_action * * This cast behaves correctly. */ ((const tpl_flag_action *)action)->setflag(); } /*! * \brief * * */