summaryrefslogtreecommitdiff
path: root/lib/visual_state_api/src/SMPForce.c
blob: 955d206ac177d671fe8140dedc55955d0113c9a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * Type:        Source Code File
 * 
 * Id:          SMPForce.c
 *
 * Function:    Contains the SMP_ForceState SEM Library Expert version 4 
 *              function.
 *
 * Portability: ANSI-C Compiler.
 *
 * Copyright (c) 1999-2006 IAR Systems. All rights reserved.
 */

/*
 * Version   ! Date   ! Status ! Changes
 *----------------------------------------------------------------------------
 * 4.0.0.0   ! 011198 ! Closed ! -
 * 4.0.4     ! 010799 ! Closed ! Minor update, there might be no changes to this particular file.
 */

#include "SEMLibE.h"


unsigned char SMP_ForceState (SEM_CONTEXT VS_TQ_CONTEXT *Context, SEM_STATE_TYPE StateNo)
{
  if (!Context)
    return (SES_NOT_LOADED);
  if (Context->nNofStates <= StateNo)
    return (SES_RANGE_ERR);
  Context->pCSV[Context->pSMI[StateNo]] = StateNo;
  return (SES_OKAY);
}