diff --git a/controllers/get_zjj1y_crc16.c b/controllers/get_zjj1y_crc16.c new file mode 100644 index 0000000000000000000000000000000000000000..4b5be3649be53c2ad6633e045029e50d4ca0942c --- /dev/null +++ b/controllers/get_zjj1y_crc16.c @@ -0,0 +1,285 @@ +/* + * File: get_zjj1y_crc16.c + * + * + * --- THIS FILE GENERATED BY S-FUNCTION BUILDER: 3.0 --- + * + * This file is an S-function produced by the S-Function + * Builder which only recognizes certain fields. Changes made + * outside these fields will be lost the next time the block is + * used to load, edit, and resave this file. This file will be overwritten + * by the S-function Builder block. If you want to edit this file by hand, + * you must change it only in the area defined as: + * + * %%%-SFUNWIZ_defines_Changes_BEGIN + * #define NAME 'replacement text' + * %%% SFUNWIZ_defines_Changes_END + * + * DO NOT change NAME--Change the 'replacement text' only. + * + * For better compatibility with the Simulink Coder, the + * "wrapper" S-function technique is used. This is discussed + * in the Simulink Coder's Manual in the Chapter titled, + * "Wrapper S-functions". + * + * ------------------------------------------------------------------------- + * | See matlabroot/simulink/src/sfuntmpl_doc.c for a more detailed template | + * ------------------------------------------------------------------------- + * + * Created: Thu May 18 16:24:47 2023 + */ + +#define S_FUNCTION_LEVEL 2 +#define S_FUNCTION_NAME get_zjj1y_crc16 + +/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ +/* %%%-SFUNWIZ_defines_Changes_BEGIN --- EDIT HERE TO _END */ +#define NUM_INPUTS 2 + +/* Input Port 0 */ +#define IN_PORT_0_NAME ptr +#define INPUT_0_DIMS_ND {DYNAMICALLY_SIZED,1} +#define INPUT_0_NUM_ELEMS DYNAMICALLY_SIZED +#define INPUT_0_WIDTH DYNAMICALLY_SIZED +#define INPUT_DIMS_0_COL 1 +#define INPUT_0_DTYPE uint8_T +#define INPUT_0_COMPLEX COMPLEX_NO +#define IN_0_BUS_BASED 0 +#define IN_0_BUS_NAME +#define IN_0_DIMS 1-D +#define INPUT_0_FEEDTHROUGH 1 +#define IN_0_ISSIGNED 0 +#define IN_0_WORDLENGTH 8 +#define IN_0_FIXPOINTSCALING 1 +#define IN_0_FRACTIONLENGTH 9 +#define IN_0_BIAS 0 +#define IN_0_SLOPE 0.125 + +/* Input Port 1 */ +#define IN_PORT_1_NAME len +#define INPUT_1_DIMS_ND {1,1} +#define INPUT_1_NUM_ELEMS 1 +#define INPUT_1_WIDTH 1 +#define INPUT_DIMS_1_COL 1 +#define INPUT_1_DTYPE uint16_T +#define INPUT_1_COMPLEX COMPLEX_NO +#define IN_1_BUS_BASED 0 +#define IN_1_BUS_NAME +#define IN_1_DIMS 1-D +#define INPUT_1_FEEDTHROUGH 1 +#define IN_1_ISSIGNED 0 +#define IN_1_WORDLENGTH 8 +#define IN_1_FIXPOINTSCALING 1 +#define IN_1_FRACTIONLENGTH 9 +#define IN_1_BIAS 0 +#define IN_1_SLOPE 0.125 +#define NUM_OUTPUTS 1 + +/* Output Port 0 */ +#define OUT_PORT_0_NAME crc +#define OUTPUT_0_DIMS_ND {1,1} +#define OUTPUT_0_NUM_ELEMS 1 +#define OUTPUT_0_WIDTH 1 +#define OUTPUT_DIMS_0_COL 1 +#define OUTPUT_0_DTYPE uint16_T +#define OUTPUT_0_COMPLEX COMPLEX_NO +#define OUT_0_BUS_BASED 0 +#define OUT_0_BUS_NAME +#define OUT_0_DIMS 1-D +#define OUT_0_ISSIGNED 1 +#define OUT_0_WORDLENGTH 8 +#define OUT_0_FIXPOINTSCALING 1 +#define OUT_0_FRACTIONLENGTH 3 +#define OUT_0_BIAS 0 +#define OUT_0_SLOPE 0.125 +#define NPARAMS 0 +#define SAMPLE_TIME_0 INHERITED_SAMPLE_TIME +#define NUM_DISC_STATES 0 +#define DISC_STATES_IC [0] +#define NUM_CONT_STATES 0 +#define CONT_STATES_IC [0] +#define SFUNWIZ_GENERATE_TLC 1 +#define SOURCEFILES "__SFB__" +#define PANELINDEX N/A +#define USE_SIMSTRUCT 0 +#define SHOW_COMPILE_STEPS 0 +#define CREATE_DEBUG_MEXFILE 0 +#define SAVE_CODE_ONLY 0 +#define SFUNWIZ_REVISION 3.0 + +/* %%%-SFUNWIZ_defines_Changes_END --- EDIT HERE TO _BEGIN */ +/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<*/ +#include "simstruc.h" + +extern void get_zjj1y_crc16_Start_wrapper(void); +extern void get_zjj1y_crc16_Outputs_wrapper(const uint8_T *ptr, + const uint16_T *len, + uint16_T *crc, + const int_T u_0_width); +extern void get_zjj1y_crc16_Terminate_wrapper(void); + +/*====================* + * S-function methods * + *====================*/ +/* Function: mdlInitializeSizes =============================================== + * Abstract: + * Setup sizes of the various vectors. + */ +static void mdlInitializeSizes(SimStruct *S) +{ + DECL_AND_INIT_DIMSINFO(inputDimsInfo); + DECL_AND_INIT_DIMSINFO(outputDimsInfo); + ssSetNumSFcnParams(S, NPARAMS); + if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) { + return; /* Parameter mismatch will be reported by Simulink */ + } + + ssSetArrayLayoutForCodeGen(S, SS_COLUMN_MAJOR); + ssSetOperatingPointCompliance(S, USE_DEFAULT_OPERATING_POINT); + ssSetNumContStates(S, NUM_CONT_STATES); + ssSetNumDiscStates(S, NUM_DISC_STATES); + if (!ssSetNumInputPorts(S, NUM_INPUTS)) + return; + + /* Input Port 0 */ + ssAllowSignalsWithMoreThan2D(S); + inputDimsInfo.numDims = 2; + inputDimsInfo.width = INPUT_0_NUM_ELEMS; + int_T in0Dims[] = INPUT_0_DIMS_ND; + inputDimsInfo.dims = in0Dims; + ssSetInputPortDimensionInfo(S, 0, &inputDimsInfo); + ssSetInputPortDataType(S, 0, SS_UINT8); + ssSetInputPortComplexSignal(S, 0, INPUT_0_COMPLEX); + ssSetInputPortDirectFeedThrough(S, 0, INPUT_0_FEEDTHROUGH); + ssSetInputPortRequiredContiguous(S, 0, 1);/*direct input signal access*/ + + /* Input Port 1 */ + ssSetInputPortWidth(S, 1, INPUT_1_NUM_ELEMS); + ssSetInputPortDataType(S, 1, SS_UINT16); + ssSetInputPortComplexSignal(S, 1, INPUT_1_COMPLEX); + ssSetInputPortDirectFeedThrough(S, 1, INPUT_1_FEEDTHROUGH); + ssSetInputPortRequiredContiguous(S, 1, 1);/*direct input signal access*/ + if (!ssSetNumOutputPorts(S, NUM_OUTPUTS)) + return; + + /* Output Port 0 */ + ssSetOutputPortWidth(S, 0, OUTPUT_0_NUM_ELEMS); + ssSetOutputPortDataType(S, 0, SS_UINT16); + ssSetOutputPortComplexSignal(S, 0, OUTPUT_0_COMPLEX); + ssSetNumPWork(S, 0); + ssSetNumSampleTimes(S, 1); + ssSetNumRWork(S, 0); + ssSetNumIWork(S, 0); + ssSetNumModes(S, 0); + ssSetNumNonsampledZCs(S, 0); + ssSetSimulinkVersionGeneratedIn(S, "10.6"); + + /* Take care when specifying exception free code - see sfuntmpl_doc.c */ + ssSetOptions(S, (SS_OPTION_EXCEPTION_FREE_CODE | + SS_OPTION_USE_TLC_WITH_ACCELERATOR | + SS_OPTION_WORKS_WITH_CODE_REUSE)); +} + +#if defined(MATLAB_MEX_FILE) +#define MDL_SET_INPUT_PORT_DIMENSION_INFO + +static void mdlSetInputPortDimensionInfo(SimStruct *S, + int_T port, + const DimsInfo_T *dimsInfo) +{ + if (!ssSetInputPortDimensionInfo(S, port, dimsInfo)) + return; +} + +#endif + +#define MDL_SET_OUTPUT_PORT_DIMENSION_INFO +#if defined(MDL_SET_OUTPUT_PORT_DIMENSION_INFO) + +static void mdlSetOutputPortDimensionInfo(SimStruct *S, + int_T port, + const DimsInfo_T *dimsInfo) +{ + if (!ssSetOutputPortDimensionInfo(S, port, dimsInfo)) + return; +} + +#endif + +/* Function: mdlInitializeSampleTimes ========================================= + * Abstract: + * Specifiy the sample time. + */ +static void mdlInitializeSampleTimes(SimStruct *S) +{ + ssSetSampleTime(S, 0, SAMPLE_TIME_0); + ssSetModelReferenceSampleTimeDefaultInheritance(S); + ssSetOffsetTime(S, 0, 0.0); +} + +#define MDL_SET_INPUT_PORT_DATA_TYPE + +static void mdlSetInputPortDataType(SimStruct *S, int port, DTypeId dType) +{ + ssSetInputPortDataType(S, 0, dType); +} + +#define MDL_SET_OUTPUT_PORT_DATA_TYPE + +static void mdlSetOutputPortDataType(SimStruct *S, int port, DTypeId dType) +{ + ssSetOutputPortDataType(S, 0, dType); +} + +#define MDL_SET_DEFAULT_PORT_DATA_TYPES + +static void mdlSetDefaultPortDataTypes(SimStruct *S) +{ + ssSetInputPortDataType(S, 0, SS_DOUBLE); + ssSetOutputPortDataType(S, 0, SS_DOUBLE); +} + +#define MDL_START /* Change to #undef to remove function */ +#if defined(MDL_START) + +/* Function: mdlStart ======================================================= + * Abstract: + * This function is called once at start of model execution. If you + * have states that should be initialized once, this is the place + * to do it. + */ +static void mdlStart(SimStruct *S) +{ + get_zjj1y_crc16_Start_wrapper(); +} + +#endif /* MDL_START */ + +/* Function: mdlOutputs ======================================================= + * + */ +static void mdlOutputs(SimStruct *S, int_T tid) +{ + const uint8_T *ptr = (uint8_T *) ssGetInputPortRealSignal(S, 0); + const uint16_T *len = (uint16_T *) ssGetInputPortRealSignal(S, 1); + uint16_T *crc = (uint16_T *) ssGetOutputPortRealSignal(S, 0); + const int_T u_0_width = ssGetInputPortWidth(S, 0); + get_zjj1y_crc16_Outputs_wrapper(ptr, len, crc, u_0_width); +} + +/* Function: mdlTerminate ===================================================== + * Abstract: + * In this function, you should perform any actions that are necessary + * at the termination of a simulation. For example, if memory was + * allocated in mdlStart, this is the place to free it. + */ +static void mdlTerminate(SimStruct *S) +{ + get_zjj1y_crc16_Terminate_wrapper(); +} + +#ifdef MATLAB_MEX_FILE /* Is this file being compiled as a MEX-file? */ +#include "simulink.c" /* MEX-file interface mechanism */ +#else +#include "cg_sfun.h" /* Code generation registration function */ +#endif diff --git a/controllers/get_zjj1y_crc16.mexw64 b/controllers/get_zjj1y_crc16.mexw64 new file mode 100644 index 0000000000000000000000000000000000000000..aef73993e3ee17115321935d18acd500418b8e0d Binary files /dev/null and b/controllers/get_zjj1y_crc16.mexw64 differ diff --git a/controllers/get_zjj1y_crc16.tlc b/controllers/get_zjj1y_crc16.tlc new file mode 100644 index 0000000000000000000000000000000000000000..e3cdf55de4162831ff2b598bbc73ad246e4d464e --- /dev/null +++ b/controllers/get_zjj1y_crc16.tlc @@ -0,0 +1,169 @@ +%% File : get_zjj1y_crc16.tlc +%% Created : Thu May 18 16:29:25 2023 +%% +%% Description: +%% Simulink Coder wrapper functions interface generated for +%% S-function "get_zjj1y_crc16.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 get_zjj1y_crc16 "C" +%% Function: BlockTypeSetup =================================================== +%% +%% Purpose: +%% Set up external references for wrapper functions in the +%% generated code. +%% +%function BlockTypeSetup(block, system) Output + %assign uint16Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT16) + %assign uint8Type = LibGetDataTypeNameFromId(::CompiledModel.tSS_UINT8) + %assign intType = LibGetDataTypeNameFromId(::CompiledModel.tSS_INTEGER) + + %if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel + %assign hFileName = "get_zjj1y_crc16_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 + #include "rtwtypes.h" + #endif + #ifdef __cplusplus + #define SFB_EXTERN_C extern "C" + #else + #define SFB_EXTERN_C extern + #endif + SFB_EXTERN_C void get_zjj1y_crc16_Start_wrapper_accel(void); + SFB_EXTERN_C void get_zjj1y_crc16_Outputs_wrapper_accel(const %<uint8Type> *ptr, + const %<uint16Type> *len, + %<uint16Type> *crc, + const %<intType> u_0_width); + SFB_EXTERN_C void get_zjj1y_crc16_Terminate_wrapper_accel(void); + #undef SFB_EXTERN_C + #endif + %closefile hFile + + %assign cFileName = "get_zjj1y_crc16_accel_wrapper" + %openfile cFile = "%<cFileName>.c" + %selectfile cFile + #include <string.h> + #ifdef MATLAB_MEX_FILE + #include "tmwtypes.h" + #else + #include "rtwtypes.h" + #endif + #include "%<hFileName>.h" + + + extern void get_zjj1y_crc16_Start_wrapper(void); + extern void get_zjj1y_crc16_Outputs_wrapper(const %<uint8Type> *ptr, + const %<uint16Type> *len, + %<uint16Type> *crc, + const %<intType> u_0_width); + extern void get_zjj1y_crc16_Terminate_wrapper(void); + void get_zjj1y_crc16_Start_wrapper_accel(void){ + get_zjj1y_crc16_Start_wrapper(); + } + void get_zjj1y_crc16_Outputs_wrapper_accel(const %<uint8Type> *ptr, + const %<uint16Type> *len, + %<uint16Type> *crc, + const %<intType> u_0_width){ + get_zjj1y_crc16_Outputs_wrapper(ptr, + len, + crc, + u_0_width); + } + void get_zjj1y_crc16_Terminate_wrapper_accel(void){ + get_zjj1y_crc16_Terminate_wrapper(); + } + + %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 get_zjj1y_crc16_Start_wrapper(void); + + SFB_EXTERN_C void get_zjj1y_crc16_Outputs_wrapper(const %<uint8Type> *ptr, + const %<uint16Type> *len, + %<uint16Type> *crc, + const %<intType> u_0_width); + + SFB_EXTERN_C void get_zjj1y_crc16_Terminate_wrapper(void); + + #undef SFB_EXTERN_C + %closefile externs + %<LibCacheExtern(externs)> + + %endif + %% +%endfunction + + +%% Function: Start ============================================================ +%% +%function Start(block, system) Output + /* %<Type> Block: %<Name> */ + + %if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel + get_zjj1y_crc16_Start_wrapper_accel(); + %else + get_zjj1y_crc16_Start_wrapper(); + %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 pu_0_width = LibBlockInputSignalWidth(0) + %assign py0 = LibBlockOutputSignalAddr(0, "", "", 0) + + %if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel + get_zjj1y_crc16_Outputs_wrapper_accel(%<pu0>, %<pu1>, %<py0>, %<pu_0_width>); + %else + get_zjj1y_crc16_Outputs_wrapper(%<pu0>, %<pu1>, %<py0>, %<pu_0_width>); + %endif + + %% +%endfunction + +%% Function: Terminate ======================================================== +%% +%function Terminate(block, system) Output + /* %<Type> Block: %<Name> */ + + %if IsModelReferenceSimTarget() || CodeFormat == "S-Function" || ::isRAccel + get_zjj1y_crc16_Terminate_wrapper_accel(); + %else + get_zjj1y_crc16_Terminate_wrapper(); + %endif + +%endfunction + +%% [EOF] get_zjj1y_crc16.tlc + diff --git a/controllers/get_zjj1y_crc16_wrapper.c b/controllers/get_zjj1y_crc16_wrapper.c new file mode 100644 index 0000000000000000000000000000000000000000..4b274938961609123e2121227c8c7281683c28a1 --- /dev/null +++ b/controllers/get_zjj1y_crc16_wrapper.c @@ -0,0 +1,133 @@ + +/* + * Include Files + * + */ +#if defined(MATLAB_MEX_FILE) +#include "tmwtypes.h" +#include "simstruc_types.h" +#else +#define SIMPLIFIED_RTWTYPES_COMPATIBILITY +#include "rtwtypes.h" +#undef SIMPLIFIED_RTWTYPES_COMPATIBILITY +#endif + + + +/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */ +#include <math.h> +#include <stdint.h> +#include <stddef.h> +/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */ +#define u_1_width 1 +#define y_width 1 + +/* + * Create external references here. + * + */ +/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */ +/* extern double func(double a); */ +uint16_t init_val = 0x0000; +const uint16_t crc16_tab[256]= {0x0,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7, + 0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef, + 0x1231,0x210,0x3273,0x2252,0x52b5,0x4294,0x72f7,0x62d6, + 0x9339,0x8318,0xb37b,0xa35a,0xd3bd,0xc39c,0xf3ff,0xe3de, + 0x2462,0x3443,0x420,0x1401,0x64e6,0x74c7,0x44a4,0x5485, + 0xa56a,0xb54b,0x8528,0x9509,0xe5ee,0xf5cf,0xc5ac,0xd58d, + 0x3653,0x2672,0x1611,0x630,0x76d7,0x66f6,0x5695,0x46b4, + 0xb75b,0xa77a,0x9719,0x8738,0xf7df,0xe7fe,0xd79d,0xc7bc, + 0x48c4,0x58e5,0x6886,0x78a7,0x840,0x1861,0x2802,0x3823, + 0xc9cc,0xd9ed,0xe98e,0xf9af,0x8948,0x9969,0xa90a,0xb92b, + 0x5af5,0x4ad4,0x7ab7,0x6a96,0x1a71,0xa50,0x3a33,0x2a12, + 0xdbfd,0xcbdc,0xfbbf,0xeb9e,0x9b79,0x8b58,0xbb3b,0xab1a, + 0x6ca6,0x7c87,0x4ce4,0x5cc5,0x2c22,0x3c03,0xc60,0x1c41, + 0xedae,0xfd8f,0xcdec,0xddcd,0xad2a,0xbd0b,0x8d68,0x9d49, + 0x7e97,0x6eb6,0x5ed5,0x4ef4,0x3e13,0x2e32,0x1e51,0xe70, + 0xff9f,0xefbe,0xdfdd,0xcffc,0xbf1b,0xaf3a,0x9f59,0x8f78, + 0x9188,0x81a9,0xb1ca,0xa1eb,0xd10c,0xc12d,0xf14e,0xe16f, + 0x1080,0xa1,0x30c2,0x20e3,0x5004,0x4025,0x7046,0x6067, + 0x83b9,0x9398,0xa3fb,0xb3da,0xc33d,0xd31c,0xe37f,0xf35e, + 0x2b1,0x1290,0x22f3,0x32d2,0x4235,0x5214,0x6277,0x7256, + 0xb5ea,0xa5cb,0x95a8,0x8589,0xf56e,0xe54f,0xd52c,0xc50d, + 0x34e2,0x24c3,0x14a0,0x481,0x7466,0x6447,0x5424,0x4405, + 0xa7db,0xb7fa,0x8799,0x97b8,0xe75f,0xf77e,0xc71d,0xd73c, + 0x26d3,0x36f2,0x691,0x16b0,0x6657,0x7676,0x4615,0x5634, + 0xd94c,0xc96d,0xf90e,0xe92f,0x99c8,0x89e9,0xb98a,0xa9ab, + 0x5844,0x4865,0x7806,0x6827,0x18c0,0x8e1,0x3882,0x28a3, + 0xcb7d,0xdb5c,0xeb3f,0xfb1e,0x8bf9,0x9bd8,0xabbb,0xbb9a, + 0x4a75,0x5a54,0x6a37,0x7a16,0xaf1,0x1ad0,0x2ab3,0x3a92, + 0xfd2e,0xed0f,0xdd6c,0xcd4d,0xbdaa,0xad8b,0x9de8,0x8dc9, + 0x7c26,0x6c07,0x5c64,0x4c45,0x3ca2,0x2c83,0x1ce0,0xcc1, + 0xef1f,0xff3e,0xcf5d,0xdf7c,0xaf9b,0xbfba,0x8fd9,0x9ff8, + 0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0xed1,0x1ef0 + }; + +/*********************************************************** +CRC16 Coding & Decoding G(X) = X^16+X^12+X^5+1 +***********************************************************/ +uint16_t CRC_Calculate(uint8_t *ptr, uint16_t len, uint16_t crc_init) +{ + uint16_t crc, oldcrc16; + uint8_t temp; + crc = crc_init; + while (len--!=0) + { + temp=(crc>>8)&0xff; + oldcrc16=crc16_tab[*ptr^temp]; + crc=(crc<<8)^oldcrc16; + ptr++; + + + } + + return(crc); +} +/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */ + +/* + * Start function + * + */ +void get_zjj1y_crc16_Start_wrapper(void) +{ +/* %%%-SFUNWIZ_wrapper_Start_Changes_BEGIN --- EDIT HERE TO _END */ +/* + * Custom Start code goes here. + */ +/* %%%-SFUNWIZ_wrapper_Start_Changes_END --- EDIT HERE TO _BEGIN */ +} +/* + * Output function + * + */ +void get_zjj1y_crc16_Outputs_wrapper(const uint8_T *ptr, + const uint16_T *len, + uint16_T *crc, + const int_T u_width) +{ +/* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */ +/* This sample sets the output equal to the input + y0[0] = u0[0]; + For complex signals use: y0[0].re = u0[0].re; + y0[0].im = u0[0].im; + y1[0].re = u1[0].re; + y1[0].im = u1[0].im; + */ + crc[0] =CRC_Calculate(ptr, len[0], init_val); +/* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */ +} + +/* + * Terminate function + * + */ +void get_zjj1y_crc16_Terminate_wrapper(void) +{ +/* %%%-SFUNWIZ_wrapper_Terminate_Changes_BEGIN --- EDIT HERE TO _END */ +/* + * Custom Terminate code goes here. + */ +/* %%%-SFUNWIZ_wrapper_Terminate_Changes_END --- EDIT HERE TO _BEGIN */ +} + diff --git a/controllers/pack_parser.slx b/controllers/pack_parser.slx index 3e25818ef38d4d82b82bbaada426e73ae6af44e0..30c5209dfe5b3e746f1cff616a7cbe0677124e1a 100644 Binary files a/controllers/pack_parser.slx and b/controllers/pack_parser.slx differ