Format everything

The next commit will add this to a `.git-blame-ignore-revs` file which
you can use to ignore this commit when running git blame. Simply run

    git blame --ignore-revs-file .git-blame-ignore-revs [...]

Or configure git to persistently ignore the commit:

    git config blame.ignoreRevsFile .git-blame-ignore-revs
This commit is contained in:
2022-03-13 20:30:14 +01:00
parent 14b5f6988d
commit 41d3bd907e
16 changed files with 2336 additions and 2319 deletions

View File

@ -13,9 +13,7 @@ struct FaultStatusRegisters {
uint32_t SHCSR;
};
enum class FaultType {
HardFault, MemManage, BusFault, UsageFault
};
enum class FaultType { HardFault, MemManage, BusFault, UsageFault };
struct FlashDump {
FaultType type;
@ -43,22 +41,23 @@ const FlashDump *flash_dump_get_fault(uint32_t n);
void uart_wait_for_txrdy();
size_t uart_write(uint8_t c);
size_t uart_print(const char* str);
size_t uart_print(const char *str);
size_t uart_print_hex(uint32_t x);
void print_dumped_faults(bool in_irq=false);
void print_stacked_registers(const uint32_t *stack, bool in_irq=false);
void print_fault_registers(const FaultStatusRegisters *fsr, bool in_irq=false);
void print_dumped_faults(bool in_irq = false);
void print_stacked_registers(const uint32_t *stack, bool in_irq = false);
void print_fault_registers(const FaultStatusRegisters *fsr,
bool in_irq = false);
FaultStatusRegisters get_current_fsr();
const char* get_fault_type_name(FaultType type);
void fault_handler(uint32_t *stack_addr, FaultType fault_type,
const int *leds, unsigned n_leds);
const char *get_fault_type_name(FaultType type);
void fault_handler(uint32_t *stack_addr, FaultType fault_type, const int *leds,
unsigned n_leds);
void inline busy_wait(size_t iterations) {
for (size_t i = 0; i < iterations; i++) {
// Does nothing, but ensures the compiler doesn't optimize the loop away.
__ASM ("" ::: "memory");
__ASM("" ::: "memory");
}
}