aboutsummaryrefslogtreecommitdiff
path: root/robot/hypervisor.c
blob: 8c223161e3dbe8cea3dd7ac3d046a1441b40e2f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "consts.h"
#include "errcatch.h"
#include "hypervisor.h"
#include "io.h"
#include "modes.h"
#include "sercomm.h"
#include "orangutan_shim.h"

void w2_hypervisor_main() {
	w2_sercomm_main();
	w2_errcatch_main();
	w2_io_main();

	time_reset();
	w2_modes_main();
	unsigned long elapsed_ms = get_ms();
	if (elapsed_ms > W2_MAX_MODULE_CYCLE_MS) w2_errcatch_throw(W2_ERR_CYCLE_EXPIRED);
}