Files
bia_microddr_fw/bootloader/src/main.c

31 lines
582 B
C
Raw Normal View History

/*
* File: main.c
* Author: justin
*
* Created on August 9, 2019, 6:14 PM
*/
#include <xc.h>
#include "usb.h"
#include "bootloader.h"
void main(void) {
UserInit();
// 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
ProcessIO();
}
}