Sming Framework API
()
Toggle main menu visibility
Sming
Libraries
USB
src
USB
DeviceInterface.h
Go to the documentation of this file.
1
/****
2
* DeviceInterface.h
3
*
4
* Copyright 2023 mikee47 <mike@sillyhouse.net>
5
*
6
* This file is part of the Sming USB Library
7
*
8
* This library is free software: you can redistribute it and/or modify it under the terms of the
9
* GNU General Public License as published by the Free Software Foundation, version 3 or later.
10
*
11
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
* See the GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along with this library.
16
* If not, see <https://www.gnu.org/licenses/>.
17
*
18
****/
19
20
#pragma once
21
22
#include "
Descriptors.h
"
23
24
namespace
USB
25
{
29
class
DeviceInterface
30
{
31
public
:
37
DeviceInterface
(
uint8_t
instance,
const
char
*
name
) :
inst
(instance),
name
(
name
)
38
{
39
}
40
41
const
char
*
getName
()
const
42
{
43
return
name
;
44
}
45
46
protected
:
47
uint8_t
inst
;
48
const
char
*
name
;
49
};
50
51
}
// namespace USB
USB
Definition:
Libraries/USB/src/USB/CDC/Device.h:25
uint8_t
USB::DeviceInterface::inst
uint8_t inst
Definition:
DeviceInterface.h:81
USB::DeviceInterface::getName
const char * getName() const
Definition:
DeviceInterface.h:75
USB::DeviceInterface::name
const char * name
Definition:
DeviceInterface.h:82
USB::DeviceInterface::DeviceInterface
DeviceInterface(uint8_t instance, const char *name)
Constructor.
Definition:
DeviceInterface.h:71
Descriptors.h
Generated by
1.8.17