Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
2 changed files with 12 additions and 2 deletions
Showing only changes of commit 13390bff08 - Show all commits

View File

@ -155,6 +155,14 @@ namespace JabyEngine {
return __syscall_function_cast(Table_B, ThreadHandle(*)(void(*)(), uint32_t*, uint32_t*))(thread_func, stack_ptr, gp);
}
// No return??????
static __always_inline void ChangeThread(ThreadHandle handle) {
register uint32_t FuncID asm("t1") = 0x10;
__asm__ volatile("" : "=r"(FuncID) : "r"(FuncID));
__syscall_function_cast(Table_B, void(*)(ThreadHandle))(handle);
}
static __always_inline void InitPad(uint8_t *portA, uint32_t portASize, uint8_t *portB, uint32_t portBSize) {
register uint32_t FuncID asm("t1") = 0x12;
__asm__ volatile("" : "=r"(FuncID) : "r"(FuncID));

View File

@ -155,8 +155,10 @@ namespace JabyEngine {
}
void data_ready_handler(uint32_t data) {
printf("Data: %i\n", data);
MainThread::restore();
while(true) {
printf("Data: %i\n", data);
SysCall::ChangeThread(0xFF000000);
}
}
}