feat: add lab-rv32i-freertos-mutex card

This commit is contained in:
user
2026-07-21 19:14:19 +02:00
commit 6419a78ff6
67 changed files with 37023 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
#include <stdint.h>
#include "lab_io.h"
#define H3_IO_BASE ( 0xC0000000UL )
#define H3_IO_PRINT_CHAR ( *( ( volatile uint32_t * ) ( H3_IO_BASE + 0x0UL ) ) )
#define H3_IO_PRINT_U32 ( *( ( volatile uint32_t * ) ( H3_IO_BASE + 0x4UL ) ) )
#define H3_IO_EXIT ( *( ( volatile uint32_t * ) ( H3_IO_BASE + 0x8UL ) ) )
void lab_puts( const char * text )
{
while( *text != '\0' )
{
H3_IO_PRINT_CHAR = ( uint32_t ) ( unsigned char ) *text;
++text;
}
}
void lab_put_u32( uint32_t value )
{
H3_IO_PRINT_U32 = value;
}
void lab_exit( uint32_t code )
{
H3_IO_EXIT = code;
for( ; ; )
{
__asm volatile ( "wfi" );
}
}