Numworks Epsilon  1.4.1
Graphing Calculator Operating System
usb.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_USB_H
2 #define ION_DEVICE_USB_H
3 
4 #include "regs/regs.h"
5 #include "ion.h"
6 #include "usb/calculator.h"
7 
8 namespace Ion {
9 namespace USB {
10 namespace Device {
11 
12 /* Pin | Role | Mode | Function
13  * -----+-------------------+-----------------------+----------
14  * PA9 | VBUS | Input, pulled down//TODO | Low = unplugged, high = plugged
15  * PA11 | USB D- | Alternate Function 10 |
16  * PA12 | USB D+ | Alternate Function 10 |
17  */
18 
19 constexpr static GPIOPin VbusPin = GPIOPin(GPIOA, 9);
20 constexpr static GPIOPin DmPin = GPIOPin(GPIOA, 11);
21 constexpr static GPIOPin DpPin = GPIOPin(GPIOA, 12);
22 
23 void init();
24 void shutdown();
25 void initGPIO();
26 void shutdownGPIO();
27 void initOTG();
28 void shutdownOTG();
29 
30 }
31 }
32 }
33 
34 #endif
void shutdownOTG()
Definition: usb.cpp:166
void init()
Definition: usb.cpp:44
void shutdownGPIO()
Definition: usb.cpp:86
void initGPIO()
Definition: usb.cpp:61
Definition: app.cpp:5
void shutdown()
Definition: usb.cpp:49
Definition: gpio.h:95
constexpr GPIO GPIOA(0)
Definition: backlight.h:6
void initOTG()
Definition: usb.cpp:94