added bootloader project - currently only able to be enumerated by USB host but doesn't do anything else yet

This commit is contained in:
2019-08-10 15:30:49 -04:00
parent 402eaed8e6
commit e137112603
7 changed files with 926 additions and 0 deletions

27
bootloader/src/main.c Normal file
View File

@@ -0,0 +1,27 @@
/*
* File: main.c
* Author: justin
*
* Created on August 9, 2019, 6:14 PM
*/
#include <xc.h>
#include "usb.h"
void main(void) {
// initialize the USB framework
USBDeviceInit();
USBDeviceAttach();
while(1)
{
USBDeviceTasks();
// do nothing if: not connected to USB host, or the host put us in suspend state
if((USBGetDeviceState() < CONFIGURED_STATE) | USBIsDeviceSuspended())
continue;
// run application specific tasks
//DANCEPAD_Tasks();
}
}