LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
c_output.h
Go to the documentation of this file.
1 /*
2  * LEGO® MINDSTORMS EV3
3  *
4  * Copyright (C) 2010-2013 The LEGO Group
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 
22 #ifndef C_OUTPUT_H_
23 #define C_OUTPUT_H_
24 
25 RESULT cOutputInit(void);
26 
27 RESULT cOutputOpen(void);
28 
29 RESULT cOutputClose(void);
30 
31 RESULT cOutputExit(void);
32 
33 void cOutputSetTypes(char *pTypes);
34 void cOutputSetType(void);
36 void cMotorSetBusyFlags(UBYTE Flags);
37 void ResetDelayCounter(UBYTE Pattern);
38 
39 void cOutputReset(void);
40 void cOutputStop(void);
41 void cOutputPrgStop(void);
42 void cOutputPower(void);
43 void cOutputSpeed(void);
44 void cOutputStart(void);
45 void cOutputPolarity(void);
46 
47 void cOutputRead(void);
48 void cOutputTest(void);
49 void cOutputReady(void);
50 void cOutputStepPower(void);
51 void cOutputTimePower(void);
52 void cOutputStepSpeed(void);
53 void cOutputTimeSpeed(void);
54 void cOutputStepSync(void);
55 void cOutputTimeSync(void);
56 void cOutputClrCount(void);
57 void cOutputGetCount(void);
58 
59 typedef struct
60 {
61  //*****************************************************************************
62  // Output Global variables
63  //*****************************************************************************
64 
65  DATA8 OutputType[OUTPUTS];
66  OBJID Owner[OUTPUTS];
67 
68  int PwmFile;
69  int MotorFile;
70 
71  MOTORDATA MotorData[OUTPUTS];
73 }
75 
76 #if (HARDWARE == SIMULATION)
78  #define OutputInstance (*gOutputInstance)
79 
80  void setOutputInstance(OUTPUT_GLOBALS * _Instance);
82 #else
84 #endif
85 
86 #endif /* C_OUTPUT_H_ */
void setOutputInstance(OUTPUT_GLOBALS *_Instance)
Definition: c_output.c:157
void cOutputStepPower(void)
opOUTPUT_STEP_POWER byte code
Definition: c_output.c:978
RESULT cOutputOpen(void)
Definition: c_output.c:234
void cOutputTimePower(void)
opOUTPUT_TIME_POWER byte code
Definition: c_output.c:1069
void cOutputTimeSync(void)
opOUTPUT_STEP_SYNC byte code
Definition: c_output.c:1440
OUTPUT_GLOBALS * gOutputInstance
Definition: c_output.c:155
UWORD OBJID
Object id type.
Definition: lmstypes.h:73
RESULT cOutputExit(void)
Definition: c_output.c:259
void cOutputStop(void)
opOUTPUT_STOP byte code
Definition: c_output.c:606
void cOutputPrgStop(void)
opOUTPUT_PRG_STOP byte code
Definition: c_output.c:430
void cOutputReady(void)
opOUTPUT_READY byte code
Definition: c_output.c:1561
RESULT cOutputInit(void)
Definition: c_output.c:196
void cOutputStepSpeed(void)
opOUTPUT_STEP_SPEED byte code
Definition: c_output.c:1155
void cOutputSetType(void)
opOUTPUT_SET_TYPE byte code
Definition: c_output.c:458
void cOutputSetTypes(char *pTypes)
Definition: c_output.c:282
void cOutputStepSync(void)
opOUTPUT_STEP_SYNC byte code
Definition: c_output.c:1355
void cOutputRead(void)
opOUTPUT_READ byte code
Definition: c_output.c:1520
void cOutputPolarity(void)
opOUTPUT_POLARITY byte code
Definition: c_output.c:909
void cOutputSpeed(void)
opOUTPUT_SPEED byte code
Definition: c_output.c:679
MOTORDATA * pMotor
Definition: c_output.h:72
unsigned char UBYTE
Basic Type used to symbolise 8 bit unsigned values.
Definition: lmstypes.h:29
void cOutputReset(void)
opOUTPUT_RESET byte code
Definition: c_output.c:538
#define OUTPUTS
Number of output ports in the system.
Definition: lms2012.h:191
void ResetDelayCounter(UBYTE Pattern)
Definition: c_output.c:376
UBYTE cMotorGetBusyFlags(void)
Definition: c_output.c:382
OUTPUT_GLOBALS * getOutputInstance()
Definition: c_output.c:162
RESULT cOutputClose(void)
Definition: c_output.c:253
void cOutputPower(void)
opOUTPUT_POWER byte code
Definition: c_output.c:751
void cOutputGetCount(void)
opOUTPUT_GET_COUNT byte code
Definition: c_output.c:1779
void cMotorSetBusyFlags(UBYTE Flags)
Definition: c_output.c:406
void cOutputTest(void)
opOUTPUT_TEST byte code
Definition: c_output.c:1654
void cOutputTimeSpeed(void)
opOUTPUT_TIME_SPEED byte code
Definition: c_output.c:1269
SBYTE DATA8
VM Type for 1 byte signed value.
Definition: lmstypes.h:61
#define OutputInstance
Definition: c_output.h:78
void cOutputStart(void)
opOUTPUT_START byte code
Definition: c_output.c:824
void cOutputClrCount(void)
opOUTPUT_CLR_COUNT byte code
Definition: c_output.c:1705