mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-07 22:22:21 -04:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -41,33 +41,33 @@ namespace rssi {
|
|||
constexpr uint8_t adc1_sel = (1 << portapack::adc1_rssi_input);
|
||||
const auto adc1_interrupt_mask = flp2(adc1_sel);
|
||||
|
||||
constexpr adc::CR adc1_cr {
|
||||
.sel = adc1_sel,
|
||||
.clkdiv = 49, /* 400kHz sample rate, 2.5us/sample @ 200MHz PCLK */
|
||||
.resolution = 9, /* Ten clocks */
|
||||
.edge = 0,
|
||||
constexpr adc::CR adc1_cr{
|
||||
.sel = adc1_sel,
|
||||
.clkdiv = 49, /* 400kHz sample rate, 2.5us/sample @ 200MHz PCLK */
|
||||
.resolution = 9, /* Ten clocks */
|
||||
.edge = 0,
|
||||
};
|
||||
constexpr adc::Config adc1_config {
|
||||
.cr = adc1_cr,
|
||||
constexpr adc::Config adc1_config{
|
||||
.cr = adc1_cr,
|
||||
};
|
||||
|
||||
void init() {
|
||||
adc1::clock_enable();
|
||||
adc1::interrupts_disable();
|
||||
adc1::power_up(adc1_config);
|
||||
adc1::interrupts_enable(adc1_interrupt_mask);
|
||||
adc1::clock_enable();
|
||||
adc1::interrupts_disable();
|
||||
adc1::power_up(adc1_config);
|
||||
adc1::interrupts_enable(adc1_interrupt_mask);
|
||||
|
||||
dma::init();
|
||||
dma::init();
|
||||
}
|
||||
|
||||
void start() {
|
||||
dma::enable();
|
||||
adc1::start_burst();
|
||||
dma::enable();
|
||||
adc1::start_burst();
|
||||
}
|
||||
|
||||
void stop() {
|
||||
dma::disable();
|
||||
adc1::stop_burst();
|
||||
dma::disable();
|
||||
adc1::stop_burst();
|
||||
}
|
||||
|
||||
} /* namespace rssi */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue