USB Host Shield 2.0
UHS2_gpio.h
Go to the documentation of this file.
1
/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.
2
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; either version 2 of the License, or
6
(at your option) any later version.
7
8
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
13
You should have received a copy of the GNU General Public License
14
along with this program; if not, write to the Free Software
15
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
17
Contact information
18
-------------------
19
20
Circuits At Home, LTD
21
Web : http://www.circuitsathome.com
22
e-mail : support@circuitsathome.com
23
24
UHS2_GPIO implements "wiring" style GPIO access. Implemented by Brian Walton brian@riban.co.uk
25
*/
26
27
#if !defined(__USB2_GPIO_H__)
28
#define __USB2_GPIO_H__
29
30
#include "
Usb.h
"
31
32
class
UHS2_GPIO
{
33
public
:
34
UHS2_GPIO
(
USB
*pUsb);
35
36
void
digitalWrite
(uint8_t pin, uint8_t val);
37
int
digitalRead
(uint8_t pin);
38
int
digitalReadOutput
(uint8_t pin);
39
40
private
:
41
USB
* m_pUsb;
42
};
43
44
#endif // __USB2_GPIO_H__
UHS2_GPIO
Definition:
UHS2_gpio.h:32
UHS2_GPIO::digitalRead
int digitalRead(uint8_t pin)
Read the value from a GPIO input pin.
Definition:
UHS2_gpio.cpp:55
UHS2_GPIO::digitalWrite
void digitalWrite(uint8_t pin, uint8_t val)
Set a GPIO output value.
Definition:
UHS2_gpio.cpp:40
USB
Definition:
UsbCore.h:210
UHS2_GPIO::UHS2_GPIO
UHS2_GPIO(USB *pUsb)
Implement an instance of a UHS2_GPIO object.
Definition:
UHS2_gpio.cpp:32
Usb.h
UHS2_GPIO::digitalReadOutput
int digitalReadOutput(uint8_t pin)
Read the value from a GPIO output pin.
Definition:
UHS2_gpio.cpp:68
Generated by
1.8.17