moving between PCs - THIS IS HORRIBLY BROKEN AS OF THIS COMMIT

This commit is contained in:
2019-08-13 18:18:51 -04:00
parent 5c2d710bc2
commit 1ced4e1b78
11 changed files with 135 additions and 41 deletions

View File

@@ -65,7 +65,7 @@ typedef union _INTPUT_CONTROLS_TYPEDEF
} INPUT_CONTROLS;
// USB data must exist within the USB RAM memory space
INPUT_CONTROLS joystick_input __at(0x500);
INPUT_CONTROLS joystick_input __at(0x600);
// handle to the last data transmission - allows us to check if it completed
USB_VOLATILE USB_HANDLE lastTransmission = 0;

View File

@@ -22,35 +22,35 @@
* @date 6 Aug 2019
* @brief USB interface to 6-sensor DDR pads.
*/
const unsigned int VersionWord __at(0x1C16) = 0x0100;
#pragma warning disable 1510
#include "usb.h"
#include "padhal.h"
#include "dancepad.h"
//#include "usb.h"
//#include "padhal.h"
//#include "dancepad.h"
#include "memory.h"
//#ifdef LINK_FOR_BOOTLOADER
// only define this if building fw to be used with the bootloader
const unsigned int VersionWord __at(APP_FW_VERSION_ADDRESS) = 0x0100;
//#endif
void main(void)
{
// initialize sensor HAL & the dancepad driver
PADHAL_Initialize();
/*PADHAL_Initialize();
DANCEPAD_Initialize();
// initialize the USB framework
USBDeviceInit();
USBDeviceAttach();
USBDeviceAttach();*/
while(1)
{
// do nothing if: not connected to USB host, or the host put us in suspend state
if((USBGetDeviceState() < CONFIGURED_STATE) | USBIsDeviceSuspended())
continue;
//if((USBGetDeviceState() < CONFIGURED_STATE) | USBIsDeviceSuspended())
// continue;
// run application specific tasks
DANCEPAD_Tasks();
//DANCEPAD_Tasks();
}
}

View File

@@ -80,8 +80,8 @@
//(ex: USBDeviceTasks()) must be called periodically by the application firmware
//at a minimum rate as described in the inline code comments in usb_device.c.
//------------------------------------------------------
//#define USB_POLLING
#define USB_INTERRUPT
#define USB_POLLING
//#define USB_INTERRUPT
//------------------------------------------------------------------------------
/* Parameter definitions are defined in usb_device.h */