LookUp_U16_U16.c 791 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * File: LookUp_U16_U16.c
  3. *
  4. * Code generated for Simulink model 'SOC'.
  5. *
  6. * Model version : 1.15
  7. * Simulink Coder version : 9.4 (R2020b) 29-Jul-2020
  8. * C/C++ source code generated on : Wed Aug 11 09:45:09 2021
  9. */
  10. #include "rtwtypes.h"
  11. #include "BINARYSEARCH_U16.h"
  12. #include "INTERPOLATE_U16_U16.h"
  13. #include "LookUp_U16_U16.h"
  14. /* Lookup Utility LookUp_U16_U16 */
  15. void LookUp_U16_U16(uint16_T *pY, const uint16_T *pYData, uint16_T u, const
  16. uint16_T *pUData, uint32_T iHi)
  17. {
  18. uint32_T iLeft;
  19. uint32_T iRght;
  20. BINARYSEARCH_U16( &(iLeft), &(iRght), u, pUData, iHi);
  21. INTERPOLATE_U16_U16( pY, pYData[iLeft], pYData[iRght], u, pUData[iLeft],
  22. pUData[iRght]);
  23. }
  24. /*
  25. * File trailer for generated code.
  26. *
  27. * [EOF]
  28. */