6663b6c9
adorian
projet complet av...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#ifndef ION_DEVICE_USB_H
#define ION_DEVICE_USB_H
#include "regs/regs.h"
#include "ion.h"
#include "usb/calculator.h"
namespace Ion {
namespace USB {
namespace Device {
/* Pin | Role | Mode | Function
* -----+-------------------+-----------------------+----------
* PA9 | VBUS | Input, pulled down//TODO | Low = unplugged, high = plugged
* PA11 | USB D- | Alternate Function 10 |
* PA12 | USB D+ | Alternate Function 10 |
*/
constexpr static GPIOPin VbusPin = GPIOPin(GPIOA, 9);
constexpr static GPIOPin DmPin = GPIOPin(GPIOA, 11);
constexpr static GPIOPin DpPin = GPIOPin(GPIOA, 12);
void init();
void shutdown();
void initGPIO();
void shutdownGPIO();
void initOTG();
void shutdownOTG();
}
}
}
#endif
|