simulink-function block argument const data type

I'm wondering how to make argument data type to const varable type when generate code.
when I generate code of simulink function block, generated function is like below
  • uint8 func(uint8* u1, uint8 u2)
But I want to change u1 data type from uint8 to const uint8 in above function. what I want is
  • uint8 func(const uint8* u1, uint8 u2)
How can I do this?

답변 (1개)

Sarthak
Sarthak 2023년 4월 21일

0 개 추천

Hi 재민 권,
To make argument data type to const variable type or to any other type when generating code can be done using Code Interface option in the C Code tab. You can change the data types of your individiual model parameters for generating code.
Attaching a documentation link for your reference.

카테고리

도움말 센터File Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품

릴리스

R2022b

질문:

2023년 4월 7일

답변:

2023년 4월 21일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by