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
}
GPIO::AFR::AlternateFunction::AF0
GPIO::MODER::Mode::Analog
swd.h
Ion::SWD::Device::shutdown
void shutdown()
Definition:
swd.cpp:15
GPIO::MODER::Mode::AlternateFunction
GPIOPin
Definition:
gpio.h:95
regs.h
Ion
Definition:
backlight.h:6
Ion::SWD::Device::init
void init()
Definition:
swd.cpp:8
GPIO::PUPDR::Pull::None
epsilon
ion
src
device
swd.cpp
Generated by
1.8.14