How to call c2000 library functions with the S-Function builder?
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello everyone:
I need to communicate with a device via SPI which needs a special communications structure. For that I need to change some registers such us the transmit delay of the SPI.
To learn how to use the sfunctions. I start with something easier which is just to call the function GPIO_setPinConfig(). I included all the necessary headers but unfortunatly It gives me the following errors:
warning: implicit declaration of function 'GPIO_setPinConfig'
'GPIO_16_SPIA_SIMO' undeclared
I don't know how to solve that.
Here is the code I wrote so far.
Pls, could you give some advice about how to get this external functions to work?
Thanks in advance. I am looking forward to your reply.
답변 (1개)
Benjamin Thompson
2022년 7월 29일
If you are using mex to compile this C code into a binary for Simulink to use as an S-Function block, you probably need to use the -l and -L switches to include an external C2000 library or object file or something like that. Type "help mex" to get more information. If this is not helpful please attach some sample files of your work.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!