Files
slhal/hal_status_text_in_wrapper.c
T
Matt on ZHAN66 8c5c9db22f add more hal api
2022-11-01 20:58:46 +08:00

50 lines
1.1 KiB
C

/*
* Include Files
*
*/
#if defined(MATLAB_MEX_FILE)
#include "tmwtypes.h"
#include "simstruc_types.h"
#else
#include "rtwtypes.h"
#endif
/* %%%-SFUNWIZ_wrapper_includes_Changes_BEGIN --- EDIT HERE TO _END */
#include <string.h>
/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */
/*
* Create external references here.
*
*/
/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */
#ifdef HAL_IMPL
extern uint8_t status_text_seq;
extern uint8_t status_text_severity;
extern uint8_t status_text_txt[50];
#endif
/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */
/*
* Output function
*
*/
void hal_status_text_in_Outputs_wrapper(const uint8_T *text,
const uint8_T *width,
const uint8_T *severity,
const int_T u_width)
{
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */
#ifdef HAL_IMPL
++status_text_seq;
status_text_severity = severity[0];
memcpy(status_text_txt, text, width[0]<50?width[0]:50);
#endif
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */
}