mrfioc2  2.3.0
mrmGpio.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland
3 * mrfioc2 is distributed subject to a Software License Agreement found
4 * in file LICENSE that is included with this distribution.
5 \*************************************************************************/
6 #ifndef MRMGPIO_H
7 #define MRMGPIO_H
8 
9 #include "epicsTypes.h"
10 #include "mrfCommonIO.h"
11 
12 #include <epicsMutex.h>
13 
14 class EVRMRM;
15 
16 class MRMGpio{
17 public:
18  MRMGpio(EVRMRM&);
19 
20  epicsUInt32 getDirection(); // returns direction gpio register
21  void setDirection(epicsUInt32); // sets direction gpio register
22 
23  epicsUInt32 read(); // returns input gpio register
24 
25  epicsUInt32 getOutput(); // reads the data from the output register
26  void setOutput(epicsUInt32); // writes the data to the output register
27 
28  // mutex for locking access to GPIO pins.
29  epicsMutex lock_;
30 
31 private:
32  EVRMRM& owner_;
33 };
34 
35 #endif // MRMGPIO_H
void setOutput(epicsUInt32)
Definition: mrmGpio.cpp:38
void setDirection(epicsUInt32)
Definition: mrmGpio.cpp:21
Modular Register Map Event Receivers.
Definition: drvem.h:86
epicsUInt32 getDirection()
Definition: mrmGpio.cpp:15
epicsUInt32 getOutput()
Definition: mrmGpio.cpp:32
epicsMutex lock_
Definition: mrmGpio.h:29
MRMGpio(EVRMRM &)
Definition: mrmGpio.cpp:11
epicsUInt32 read()
Definition: mrmGpio.cpp:26