chg-stn-motherboard-ti-mcu/bs_touchAndLcd/canReceive.tlc

143 lines
4.1 KiB
Plaintext

%% File : canReceive.tlc
%% Created : Mon Oct 28 13:36:38 2024
%%
%% Description:
%% Simulink Coder wrapper functions interface generated for
%% S-function "canReceive.c".
%%
%% File generated by S-function Builder Block
%%
%% For more information on using the Target Language with the
%% Simulink Coder, see the Target Language Compiler manual
%% (under Simulink Coder) in the "Inlining S-Functions"
%% chapter under the section and subsection:
%% "Writing Block Target Files to Inline S-Functions",
%% "Function-Based or Wrappered Code".
%%
%implements canReceive "C"
%% Function: BlockTypeSetup ===================================================
%%
%% Purpose:
%% Set up external references for wrapper functions in the
%% generated code.
%%
%function BlockTypeSetup(block, system) Output
%assign uint32Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT32)
%assign charType = LibGetDataTypeNameFromId(::CompiledModel.tSS_CHAR)
%assign uint8Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT8)
%if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel
%assign hFileName = "canReceive_accel_wrapper"
%assign hFileNameMacro = FEVAL("upper", hFileName)
%openfile hFile = "%<hFileName>.h"
%selectfile hFile
#ifndef _%<hFileNameMacro>_H_
#define _%<hFileNameMacro>_H_
#ifdef MATLAB_MEX_FILE
#include "tmwtypes.h"
#else
%<LibEmitPlatformTypeIncludes()>
#endif
#ifdef __cplusplus
#define SFB_EXTERN_C extern "C"
#else
#define SFB_EXTERN_C extern
#endif
SFB_EXTERN_C void canReceive_Outputs_wrapper_accel(const %<uint32Type> *id,
const %<uint8Type> *dlc,
const %<uint8Type> *data,
void *canFrame, void *__canFrameBUS);
#undef SFB_EXTERN_C
#endif
%closefile hFile
%assign cFileName = "canReceive_accel_wrapper"
%openfile cFile = "%<cFileName>.c"
%selectfile cFile
#include <string.h>
#ifdef MATLAB_MEX_FILE
#include "tmwtypes.h"
#else
%<LibEmitPlatformTypeIncludes()>
#endif
#include "%<hFileName>.h"
#include "canReceive_bus.h"
extern void canReceive_Start_wrapper(void);
extern void canReceive_Outputs_wrapper(const %<uint32Type> *id,
const %<uint8Type> *dlc,
const %<uint8Type> *data,
CAN_MESSAGE_BUS *canFrame);
extern void canReceive_Terminate_wrapper(void);
void canReceive_Outputs_wrapper_accel(const %<uint32Type> *id,
const %<uint8Type> *dlc,
const %<uint8Type> *data,
void *canFrame, void *__canFrameBUS){
canReceive_Outputs_wrapper(id,
dlc,
data,
(CAN_MESSAGE_BUS *) __canFrameBUS);
%assign dTypeId = LibBlockOutputSignalDataTypeId(0)
%<SLibAssignUserStructToSLStruct(dTypeId, "(%<charType> *) canFrame", "(*(CAN_MESSAGE_BUS *) __canFrameBUS)", 0)>
}
%closefile cFile
%<LibAddToCommonIncludes("%<hFileName>.h")>
%else
%openfile externs
#ifdef __cplusplus
#define SFB_EXTERN_C extern "C"
#else
#define SFB_EXTERN_C extern
#endif
SFB_EXTERN_C void canReceive_Start_wrapper(void);
SFB_EXTERN_C void canReceive_Outputs_wrapper(const %<uint32Type> *id,
const %<uint8Type> *dlc,
const %<uint8Type> *data,
CAN_MESSAGE_BUS *canFrame);
SFB_EXTERN_C void canReceive_Terminate_wrapper(void);
#undef SFB_EXTERN_C
%closefile externs
%<LibCacheExtern(externs)>
%endif
%%
%endfunction
%% Function: Outputs ==========================================================
%%
%% Purpose:
%% Code generation rules for mdlOutputs function.
%%
%function Outputs(block, system) Output
%%
%assign pu0 = LibBlockInputSignalAddr(0, "", "", 0)
%assign pu1 = LibBlockInputSignalAddr(1, "", "", 0)
%assign pu2 = LibBlockInputSignalAddr(2, "", "", 0)
%assign py0 = LibBlockOutputSignalAddr(0, "", "", 0)
%if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel
%assign canFrameBUS_ptr = LibBlockDWorkAddr(canFrameBUS, "", "", 0)
canReceive_Outputs_wrapper_accel(%<pu0>, %<pu1>, %<pu2>, %<py0>, %<canFrameBUS_ptr>);
%else
canReceive_Outputs_wrapper(%<pu0>, %<pu1>, %<pu2>, %<py0>);
%endif
%%
%endfunction
%% [EOF] canReceive.tlc