bsp,abstract-machine: init CTE

This commit is contained in:
Zihao Yu 2023-05-24 12:49:11 +08:00
parent d646fbfe58
commit 4e2ce927ef
3 changed files with 15 additions and 1 deletions

View file

@ -1,6 +1,18 @@
#include <am.h>
#include <klib.h>
#include <rtthread.h>
static Context* ev_handler(Event e, Context *c) {
switch (e.event) {
default: printf("Unhandled event ID = %d\n", e.event); assert(0);
}
return c;
}
void __am_cte_init() {
cte_init(ev_handler);
}
void rt_hw_context_switch_to(rt_ubase_t to) {
assert(0);
}

View file

@ -5,6 +5,8 @@ void rt_hw_board_init() {
}
int main() {
extern void __am_cte_init();
__am_cte_init();
extern int entry(void);
entry();
return 0;

View file

@ -6,5 +6,5 @@ void rt_hw_interrupt_enable() {
}
void rt_hw_interrupt_disable() {
assert(0);
iset(0);
}