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:
jLynx 2023-05-19 08:16:05 +12:00 committed by GitHub
parent 7aca7ce74d
commit 033c4e9a5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
599 changed files with 70746 additions and 66896 deletions

View file

@ -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 */