mbv: clang-format

This commit is contained in:
2025-06-25 08:38:46 -07:00
parent 0c7206f186
commit 7f1f924331
13 changed files with 38 additions and 52 deletions

View File

@@ -10,7 +10,7 @@ Gpio* gpio0;
void sleep(int ms) {
for (int m = 0; m < ms; m++) {
for (int i = 0; i < 10000; i++) {
asm volatile ( "" );
asm volatile("");
}
}
}

View File

@@ -1,3 +1,5 @@
#include "timer.h"
#include <cstdint>
#include "bios.h"
@@ -5,14 +7,13 @@
#include "intc.h"
#include "interrupts.h"
#include "pol0.h"
#include "timer.h"
namespace {
Gpio* leds;
Timer* timer;
void Timer0Isr() {
void Timer0Isr() {
static int counter = 0;
leds->data = counter++;

View File

@@ -23,16 +23,11 @@ XUartLite* uart0 = &uart0_inst;
volatile int incoming = 0;
void HandleUartRxFromIsr(void*, unsigned int) {
incoming += 1;
}
void HandleUartRxFromIsr(void*, unsigned int) { incoming += 1; }
void HandleUartTxFromIsr(void*, unsigned int) {
}
void HandleUartTxFromIsr(void*, unsigned int) {}
void Uart0Isr() {
XUartLite_InterruptHandler(uart0);
}
void Uart0Isr() { XUartLite_InterruptHandler(uart0); }
void InitUarts() {
XUartLite_CfgInitialize(uart0, &uart0_config, uart0_config.RegBaseAddr);
@@ -62,7 +57,8 @@ int main() {
uint8_t c;
while (XUartLite_Recv(uart0, &c, 1) > 0) {
XUartLite_Send(uart0, &c, 1);
while (XUartLite_IsSending(uart0)) {}
while (XUartLite_IsSending(uart0)) {
}
}
leds->data = 0xa1;
while (1) {
@@ -71,10 +67,12 @@ int main() {
counter += 1;
leds->data = counter;
XUartLite_Send(uart0, &c, 1);
while (XUartLite_IsSending(uart0)) {}
while (XUartLite_IsSending(uart0)) {
}
while (XUartLite_Recv(uart0, &c, 1) > 0) {
XUartLite_Send(uart0, &c, 1);
while (XUartLite_IsSending(uart0)) {}
while (XUartLite_IsSending(uart0)) {
}
}
incoming -= 1;
}