#include <stdint.h>
#include <stddef.h>
#include "spinlock/spinlock.h"
#include "dev.h"
#include "hshtb.h"
#include "hal/hal.h"
#include "termdev.h"
#include "ps2kbdev.h"
#include "serialdev.h"
#include "fbdev.h"

DevTable DEVTABLE;

void dev_init(void) {
  hal_memset(&DEVTABLE, 0, sizeof(DEVTABLE));
  spinlock_init(&DEVTABLE.spinlock);

  termdev_init();
  ps2kbdev_init();
  serialdev_init();
  fbdev_init();
}
