IKC
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
#include <aal/ikc.h>
|
||||
|
||||
static struct aal_ikc_channel_desc mchannel;
|
||||
static int master_channel_packet_handler(void *__packet);
|
||||
static int master_channel_packet_handler(void *__packet, void *arg);
|
||||
|
||||
void ikc_master_init(void)
|
||||
{
|
||||
@ -12,11 +12,19 @@ void ikc_master_init(void)
|
||||
kprintf("done.\n");
|
||||
}
|
||||
|
||||
static int master_channel_packet_handler(void *__packet)
|
||||
static int master_channel_packet_handler(void *__packet, void *arg)
|
||||
{
|
||||
struct aal_ikc_master_packet *packet = __packet;
|
||||
|
||||
/* Do something */
|
||||
kprintf("Packet = %p\n", packet);
|
||||
kprintf("Master packet! : %x\n", packet->msg);
|
||||
|
||||
switch (packet->msg) {
|
||||
case MASTER_PACKET_INIT_ACK:
|
||||
aal_ikc_send(&mchannel, packet, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ extern void arch_init(void);
|
||||
extern void kmsg_init(void);
|
||||
extern void mem_init(void);
|
||||
extern void ikc_master_init(void);
|
||||
extern void arch_ready(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
@ -21,8 +22,9 @@ int main(void)
|
||||
|
||||
ikc_master_init();
|
||||
|
||||
cpu_enable_interrupt();
|
||||
arch_ready();
|
||||
|
||||
cpu_enable_interrupt();
|
||||
while (1) {
|
||||
cpu_halt();
|
||||
kprintf("back from halt.\n");
|
||||
|
||||
Reference in New Issue
Block a user