summaryrefslogtreecommitdiff
path: root/lib/visual_state_api/src/SMPState.c
blob: 180000e3207660b3937e47a7ff7cbdefafb21676 (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:          SMPState.c
 *
 * Function:    Contains the SEM_State 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_State (SEM_CONTEXT VS_TQ_CONTEXT *Context, 
  SEM_STATE_MACHINE_TYPE StateMachineNo, SEM_STATE_TYPE *StateNo)
{
  if (!Context)
    return (SES_NOT_LOADED);
  if (Context->nNofStateMachines <= StateMachineNo)
    return (SES_RANGE_ERR);
  *StateNo = Context->pCSV[StateMachineNo];
  return (SES_FOUND);
}