PWM_sf_private.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. #ifndef RTW_HEADER_PWM_sf_private_h_
  21. #define RTW_HEADER_PWM_sf_private_h_
  22. #include "rtwtypes.h"
  23. #include "multiword_types.h"
  24. #if !defined(ss_VALIDATE_MEMORY)
  25. #define ss_VALIDATE_MEMORY(S, ptr) if(!(ptr)) {\
  26. ssSetErrorStatus(S, RT_MEMORY_ALLOCATION_ERROR);\
  27. }
  28. #endif
  29. #if !defined(rt_FREE)
  30. #if !defined(_WIN32)
  31. #define rt_FREE(ptr) if((ptr) != (NULL)) {\
  32. free((ptr));\
  33. (ptr) = (NULL);\
  34. }
  35. #else
  36. /* Visual and other windows compilers declare free without const */
  37. #define rt_FREE(ptr) if((ptr) != (NULL)) {\
  38. free((void *)(ptr));\
  39. (ptr) = (NULL);\
  40. }
  41. #endif
  42. #endif
  43. real_T PWM_sf_rt_TDelayInterpolate(
  44. real_T tMinusDelay, /* tMinusDelay = currentSimTime - delay */
  45. real_T tStart,
  46. real_T *tBuf,
  47. real_T *uBuf,
  48. int_T bufSz,
  49. int_T *lastIdx,
  50. int_T oldestIdx,
  51. int_T newIdx,
  52. real_T initOutput,
  53. boolean_T discrete,
  54. boolean_T minorStepAndTAtLastMajorOutput)
  55. ;
  56. extern real_T PWM_look1_binlx(real_T u0, const real_T bp0[], const real_T table[],
  57. uint32_T maxIndex);
  58. #endif /* RTW_HEADER_PWM_sf_private_h_ */