Re: The missing piece: porting BPv4 to the open source USB s
Reply #2 –
I think the two definitions of BDENTRY are a mistake. I removed the one in usb_stack.h and left the one in picusb.h. Should ask JTR if that is wise.
Had to move typedefs for BYTE to globals.h
Around 108 of cdc.c sets the UART speed for a CDC line coding data packet. PIC 18 uses 2 SPRG(H) registers. On the PIC 24 we use U1BRG (16bits). I added a define for UART_BAUD_setup(dwBaud) for each PIC in picusb.h.
The BPv4 version uses the old stack function names and stuff. I removed the old ones at the top oc baseIO.c and added the ones from the IR TOy:
extern unsigned char usb_device_state; // JTR2 corrected type
extern unsigned char cdc_trf_state;
extern BYTE cdc_In_buffer[64];
extern BDentry *Inbdp;
Almost compiles. The USB integration functions need to be updated with the new IR Toy double buffer variables and functions.
Latest version attached.