mrfioc2  2.3.0
mrmspi.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2010 Brookhaven Science Associates, as Operator of
3 * Brookhaven National Laboratory.
4 * Copyright (c) 2015 Paul Scherrer Institute (PSI), Villigen, Switzerland
5 * mrfioc2 is distributed subject to a Software License Agreement found
6 * in file LICENSE that is included with this distribution.
7 \*************************************************************************/
8 /*
9  * Author: Michael Davidsaver <mdavidsaver@gmail.com>
10  */
11 
12 #ifndef MRMSPI_H
13 #define MRMSPI_H
14 
15 #include <mrfCommon.h>
16 #include <mrf/spi.h>
17 #include <shareLib.h>
18 
19 // SPI bus access for 0x200 firmware series EVR and EVG cores.
20 class epicsShareClass MRMSPI : public mrf::SPIInterface
21 {
22  volatile unsigned char * const base;
23 public:
24  MRMSPI(volatile unsigned char *base);
25  virtual ~MRMSPI();
26 
27  virtual void select(unsigned id) OVERRIDE FINAL;
28  virtual epicsUInt8 cycle(epicsUInt8 in) OVERRIDE FINAL;
29 };
30 
31 #endif // MRMSPI_H
virtual epicsUInt8 cycle(epicsUInt8 in)=0
Definition: mrmspi.h:20
virtual void select(unsigned id)=0
Select numbered device. 0 clears selection.
Definition: spi.cpp:21
Interface for SPI Master.
Definition: spi.h:20