| 1 | /* |
| 2 | * PWM_sf_private.h |
| 3 | * |
| 4 | * Code generation for model "PWM_sf". |
| 5 | * |
| 6 | * Model version : 1.825 |
| 7 | * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020 |
| 8 | * C source code generated on : Fri Apr 14 12:53:29 2023 |
| 9 | * |
| 10 | * Target selection: rtwsfcn.tlc |
| 11 | * Note: GRT includes extra infrastructure and instrumentation for prototyping |
| 12 | * Embedded hardware selection: ARM Compatible->ARM Cortex-M |
| 13 | * Emulation hardware selection: |
| 14 | * Differs from embedded hardware (MATLAB Host) |
| 15 | * Code generation objectives: |
| 16 | * 1. Execution efficiency |
| 17 | * 2. RAM efficiency |
| 18 | * Validation result: Not run |
| 19 | */ |
| 20 | |
| 21 | #ifndef RTW_HEADER_PWM_sf_private_h_ |
| 22 | #define RTW_HEADER_PWM_sf_private_h_ |
| 23 | #include "rtwtypes.h" |
| 24 | #include "multiword_types.h" |
| 25 | #if !defined(ss_VALIDATE_MEMORY) |
| 26 | #define ss_VALIDATE_MEMORY(S, ptr) if(!(ptr)) {\ |
| 27 | ssSetErrorStatus(S, RT_MEMORY_ALLOCATION_ERROR);\ |
| 28 | } |
| 29 | #endif |
| 30 | |
| 31 | #if !defined(rt_FREE) |
| 32 | #if !defined(_WIN32) |
| 33 | #define rt_FREE(ptr) if((ptr) != (NULL)) {\ |
| 34 | free((ptr));\ |
| 35 | (ptr) = (NULL);\ |
| 36 | } |
| 37 | #else |
| 38 | |
| 39 | /* Visual and other windows compilers declare free without const */ |
| 40 | #define rt_FREE(ptr) if((ptr) != (NULL)) {\ |
| 41 | free((void *)(ptr));\ |
| 42 | (ptr) = (NULL);\ |
| 43 | } |
| 44 | #endif |
| 45 | #endif |
| 46 | |
| 47 | real_T PWM_sf_rt_TDelayInterpolate( |
| 48 | real_T tMinusDelay, /* tMinusDelay = currentSimTime - delay */ |
| 49 | real_T tStart, |
| 50 | real_T *tBuf, |
| 51 | real_T *uBuf, |
| 52 | int_T bufSz, |
| 53 | int_T *lastIdx, |
| 54 | int_T oldestIdx, |
| 55 | int_T newIdx, |
| 56 | real_T initOutput, |
| 57 | boolean_T discrete, |
| 58 | boolean_T minorStepAndTAtLastMajorOutput) |
| 59 | ; |
| 60 | extern real_T PWM_look1_binlx(real_T u0, const real_T bp0[], const real_T table[], |
| 61 | uint32_T maxIndex); |
| 62 | |
| 63 | #endif /* RTW_HEADER_PWM_sf_private_h_ */ |
| 64 | |