Numworks Epsilon  1.4.1
Graphing Calculator Operating System
swd.cpp
Go to the documentation of this file.
1 #include "swd.h"
2 #include "regs/regs.h"
3 
4 namespace Ion {
5 namespace SWD {
6 namespace Device {
7 
8 void init() {
9  for(const GPIOPin & g : Pins) {
10  g.group().MODER()->setMode(g.pin(), GPIO::MODER::Mode::AlternateFunction);
11  g.group().AFR()->setAlternateFunction(g.pin(), GPIO::AFR::AlternateFunction::AF0);
12  }
13 }
14 
15 void shutdown() {
16  for(const GPIOPin & g : Pins) {
17  g.group().MODER()->setMode(g.pin(), GPIO::MODER::Mode::Analog);
18  g.group().PUPDR()->setPull(g.pin(), GPIO::PUPDR::Pull::None);
19  }
20 }
21 
22 }
23 }
24 }
void shutdown()
Definition: swd.cpp:15
Definition: gpio.h:95
Definition: backlight.h:6
void init()
Definition: swd.cpp:8