got the reorganized gyro board code actually working
diff --git a/gyro_board/src/usb/main.c b/gyro_board/src/usb/main.c
index 4a5eca4..3ac21c8 100644
--- a/gyro_board/src/usb/main.c
+++ b/gyro_board/src/usb/main.c
@@ -39,10 +39,7 @@
#include "CAN.h"
#include "gyro.h"
-/*
- * The task that handles the USB stack.
- */
-extern void vUSBTask(void *pvParameters);
+extern void usb_init(void);
// Sets up (and connects) PLL0.
// The CPU will be running at 100 MHz with a 12 MHz clock input when this is
@@ -162,11 +159,6 @@
int main(void) {
setup_hardware();
- /* Create the USB task. */
- xTaskCreate(vUSBTask, (signed char *) "USB",
- configMINIMAL_STACK_SIZE + 1020, (void *) NULL,
- tskIDLE_PRIORITY + 3, NULL);
-
digital_init();
analog_init();
@@ -175,11 +167,10 @@
gyro_init();
- // Enable USB. The PC has probably disconnected it now.
- USBHwAllowConnect();
-
initCAN();
+ usb_init();
+
// Start the scheduler.
vTaskStartScheduler();