upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
uln200xa.hpp
1 /*
2  * Author: Jon Trulson <jtrulson@ics.com>
3  * Copyright (c) 2015-2016 Intel Corporation.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #pragma once
25 
26 #include <uln200xa.h>
27 
28 namespace upm {
29 
61  class ULN200XA {
62  public:
63 
73  ULN200XA(int stepsPerRev, unsigned int i1, unsigned int i2,
74  unsigned int i3, unsigned int i4);
75 
79  ~ULN200XA();
80 
86  void setSpeed(unsigned int speed);
87 
93  void setDirection(ULN200XA_DIRECTION_T dir);
94 
100  void stepperSteps(unsigned int steps);
101 
106  void release();
107 
108  protected:
109  uln200xa_context m_uln200xa;
110 
111  private:
112  /* Disable implicit copy and assignment operators */
113  ULN200XA(const ULN200XA&) = delete;
114  ULN200XA &operator=(const ULN200XA&) = delete;
115  };
116 }
void setDirection(ULN200XA_DIRECTION_T dir)
Definition: uln200xa.cxx:53
C API for the uln200xa driver.
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
void release()
Definition: uln200xa.cxx:63
void stepperSteps(unsigned int steps)
Definition: uln200xa.cxx:58
~ULN200XA()
Definition: uln200xa.cxx:43
void setSpeed(unsigned int speed)
Definition: uln200xa.cxx:48
UPM module for the ULN200XA Darlington Stepper Driver.
Definition: uln200xa.hpp:61
Definition: uln200xa.h:50
ULN200XA(int stepsPerRev, unsigned int i1, unsigned int i2, unsigned int i3, unsigned int i4)
Definition: uln200xa.cxx:34