92 lines
1.9 KiB
C
92 lines
1.9 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 */
|
|
#ifdef HAL_IMPL
|
|
#include "hal_nvram_read.h"
|
|
#endif
|
|
/* %%%-SFUNWIZ_wrapper_includes_Changes_END --- EDIT HERE TO _BEGIN */
|
|
#define u_width 1
|
|
#define y_width 1
|
|
|
|
/*
|
|
* Create external references here.
|
|
*
|
|
*/
|
|
/* %%%-SFUNWIZ_wrapper_externs_Changes_BEGIN --- EDIT HERE TO _END */
|
|
|
|
/* %%%-SFUNWIZ_wrapper_externs_Changes_END --- EDIT HERE TO _BEGIN */
|
|
|
|
/*
|
|
* Start function
|
|
*
|
|
*/
|
|
void hal_nvram_cancel_Start_wrapper(const uint8_T *nvram_id, const int_T p_width0)
|
|
{
|
|
/* %%%-SFUNWIZ_wrapper_Start_Changes_BEGIN --- EDIT HERE TO _END */
|
|
#ifdef HAL_IMPL
|
|
initialize_nvram_device(nvram_id[0]);
|
|
#endif
|
|
/* %%%-SFUNWIZ_wrapper_Start_Changes_END --- EDIT HERE TO _BEGIN */
|
|
}
|
|
/*
|
|
* Output function
|
|
*
|
|
*/
|
|
void hal_nvram_cancel_Outputs_wrapper(const uint32_T *address,
|
|
int32_T *ErrorCode,
|
|
const uint8_T *nvram_id, const int_T p_width0)
|
|
{
|
|
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_BEGIN --- EDIT HERE TO _END */
|
|
#ifdef HAL_IMPL
|
|
/* ****************************************
|
|
* Cancel to read/write NAVRAM device
|
|
* this call should return immediately, so it's better to state the
|
|
* backgournd task to do the real work.
|
|
*
|
|
* inputs:
|
|
* address - Starting address to be write
|
|
*
|
|
* parameter:
|
|
* nvram_id - NV-RAM device/proxy ID
|
|
*
|
|
* outputs:
|
|
* ErrorCode - return 0 when success cancelling, otherwise return -1
|
|
*/
|
|
ErrorCode[0] = -1;
|
|
switch (nvram_id[0])
|
|
{
|
|
case 0:
|
|
if (is_nvram0_init)
|
|
{
|
|
//TODO
|
|
//ErrorCode[0] = 0;
|
|
}
|
|
break;
|
|
case 1:
|
|
if (is_nvram1_init)
|
|
{
|
|
//TODO
|
|
//ErrorCode[0] = 0;
|
|
}
|
|
break;
|
|
}
|
|
#else
|
|
ErrorCode[0] = 0;
|
|
#endif
|
|
/* %%%-SFUNWIZ_wrapper_Outputs_Changes_END --- EDIT HERE TO _BEGIN */
|
|
}
|
|
|
|
|