code cleaned

This commit is contained in:
mpabi 2024-06-02 07:14:45 +00:00
parent ef53cf7ccd
commit 93cf407fee
1 changed files with 9 additions and 12 deletions

View File

@ -1,4 +1,11 @@
//#include "stddefs.h" /*
* Subject: Interrupt Controller (IRQ), irq@MuraxSoc (RV32I)
* Lang_s: asm, c, c++
* Env: Bare Metal verilated MuraxSoc
* Tested: gdb@jtag
* mpabi@2024/PI
*/
#include <stdint.h> #include <stdint.h>
#include "murax.h" #include "murax.h"
@ -14,12 +21,6 @@ void println(const char*str){
// uart_write(UART,'\n'); // uart_write(UART,'\n');
} }
void delay(uint32_t loops){
for(int i=0;i<loops;i++){
int tmp = GPIO_A->OUTPUT;
}
}
volatile int mati = 0; volatile int mati = 0;
@ -41,12 +42,8 @@ const Timer_Reg* TimeR::ptr = reinterpret_cast<const Timer_Reg*>(0xF0020040);
int main() { int main() {
GPIO_A->OUTPUT_ENABLE = 0x0000000F; // println("hello world arty a7 v1");
GPIO_A->OUTPUT = 0x00000001;
println("hello world arty a7 v1");
const int nleds = 4;
const int nloops = 10;
interruptCtrl_init(TIMER_INTERRUPT); interruptCtrl_init(TIMER_INTERRUPT);
prescaler_init(TIMER_PRESCALER); prescaler_init(TIMER_PRESCALER);