#include "pico/stdlib.h"
#include "pico/multicore.h"
#include "pico/bootrom.h"
#include "hardware/clocks.h"

#include "usb_device.h"
#include "usb_host.h"

// main loop
int main(void) {
	// default 150MHz is not apropriate. Clock should be multiple of 12MHz
	set_sys_clock_khz(144000, true);

	sleep_ms(10);

	// run usb host on core 1
	multicore_reset_core1();
	multicore_launch_core1(usb_host_main);

	// run usb device on core 0
	usb_device_main();

	return 0;
}
