POK(kernelpart)
bsp.c File Reference
#include <errno.h>
#include <arch.h>
#include "cons.h"
#include "pm.h"
#include "pit.h"
#include "pic.h"

Go to the source code of this file.

Functions

pok_ret_t pok_bsp_init (void)
pok_ret_t pok_bsp_irq_acknowledge (uint8_t irq)
pok_ret_t pok_bsp_irq_register (uint8_t irq, void(*handler)(void))
void * pok_bsp_mem_alloc (size_t size)
pok_ret_t pok_bsp_time_init ()

Function Documentation

pok_ret_t pok_bsp_init ( void  )

Definition at line 26 of file bsp.c.

pok_ret_t pok_bsp_irq_acknowledge ( uint8_t  irq)

Definition at line 35 of file bsp.c.

{
pok_pic_eoi (irq);
return (POK_ERRNO_OK);
}
pok_ret_t pok_bsp_irq_register ( uint8_t  irq,
void(*)(void)  handler 
)

Definition at line 42 of file bsp.c.

{
pok_arch_event_register (32 + irq, handler);
return (POK_ERRNO_OK);
}
void* pok_bsp_mem_alloc ( size_t  size)

Allocate data. At this time, the pok_pm_sbrk function only increment size each time we allocate memory and was not designed to free previously allocated memory.

Definition at line 58 of file bsp.c.

{
return ((void *)pok_pm_sbrk(size));
}
pok_ret_t pok_bsp_time_init ( )

Init time. freq is the frequency of the oscillator.

Definition at line 67 of file bsp.c.

{
}