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

@ -31,57 +31,56 @@
#include "audio_dma.hpp"
static void init() {
audio::dma::init();
audio::dma::configure();
audio::dma::enable();
audio::dma::init();
audio::dma::configure();
audio::dma::enable();
nvicEnableVector(DMA_IRQn, CORTEX_PRIORITY_MASK(LPC_DMA_IRQ_PRIORITY));
nvicEnableVector(DMA_IRQn, CORTEX_PRIORITY_MASK(LPC_DMA_IRQ_PRIORITY));
}
static void halt() {
port_disable();
while(true) {
port_wait_for_interrupt();
}
port_disable();
while (true) {
port_wait_for_interrupt();
}
}
extern "C" {
void __late_init(void) {
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
/*
* System initializations.
* - HAL initialization, this also initializes the configured device drivers
* and performs the board-specific initializations.
* - Kernel initialization, the main() function becomes a thread and the
* RTOS is active.
*/
halInit();
/* After this call, scheduler, systick, heap, etc. are available. */
/* By doing chSysInit() here, it runs before C++ constructors, which may
* require the heap.
*/
chSysInit();
/* After this call, scheduler, systick, heap, etc. are available. */
/* By doing chSysInit() here, it runs before C++ constructors, which may
* require the heap.
*/
chSysInit();
/* Baseband initialization */
init();
/* Baseband initialization */
init();
}
void _default_exit(void) {
// TODO: Is this complete?
nvicDisableVector(DMA_IRQn);
chSysDisable();
// TODO: Is this complete?
systick_stop();
nvicDisableVector(DMA_IRQn);
ShutdownMessage shutdown_message;
shared_memory.application_queue.push(shutdown_message);
chSysDisable();
shared_memory.baseband_message = nullptr;
systick_stop();
halt();
ShutdownMessage shutdown_message;
shared_memory.application_queue.push(shutdown_message);
shared_memory.baseband_message = nullptr;
halt();
}
}