Hi. Keep in mind, I'm a complete newbie to all of this.. I'm trying to do my first code example with the IDE using the USB Slave Component. I've tried using both examples from this page:
https://www.matrixtsl.com/wikiv7/index. ... 425b14462f
Neither example on the page will compile without numerous errors. I haven't altered the examples other than changing the target chip. Am I doing something wrong?
Employing 18F2550 errata work-arounds:
* Corrupted fast interrupt shadow registers
USB_Slave.c:
368: DATA_PACKET INPacket;
^ (374) missing basic type; int assumed (warning)
^ (372) "," expected
369: DATA_PACKET OUTPacket;
^ (374) missing basic type; int assumed (warning)
^ (372) "," expected
USB_Slave.c: IsTxBusy()
440: return (bd1in.stat & (1 << UOWN));
^ (192) undefined identifier "bd1in"
^ (196) struct/union required
^ (192) undefined identifier "UOWN"
USB_Slave.c: FCD_07281_USB_Slave__SendString()
944: INPacket._byte[FCL_IDX] = FCL_DATA[FCL_IDX];
^ (196) struct/union required
(981) pointer required ^
(981) pointer required ^
962: USBGenericInHandle = USBTransferOnePacket(1,1,(BYTE*)&INPacket,FCL_LENGTH);
(192) undefined identifier "BYTE" ^
(195) expression syntax ^
(187) too few function arguments ^
(194) ")" expected ^
(195) expression syntax ^
USB_Slave.c: FCD_07281_USB_Slave__GetString()
993: FCR_RETVAL[FCL_IDX] = OUTPacket._byte[FCL_IDX];
(196) struct/union required ^
(981) pointer required ^
(981) pointer required ^
USB_Slave.c: FCD_07281_USB_Slave__RunSlaveService()
1040: FCM_slave_service(OUTPacket._byte[0]);
(196) struct/union required ^
(981) pointer required ^
(981) pointer required ^
1140: USBGenericInHandle = USBTransferOnePacket(1,1,(BYTE*)&OUTPacket,1);
(192) undefined identifier "BYTE" ^
USB_Slave.c: 1140: too many errors (21)
Thanks!
USB Slave examples
Moderator: Benj
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: USB Slave examples
Hmm,
This used to work in v6 but seems to have a problem with v7 currently, the other two USB components Serial and HID are ok with 8-bit PIC so hopefully we can solve this one for you too.
I'll investigate and see if I can find you a resolution or work around.
This used to work in v6 but seems to have a problem with v7 currently, the other two USB components Serial and HID are ok with 8-bit PIC so hopefully we can solve this one for you too.
I'll investigate and see if I can find you a resolution or work around.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Flowcode V4 User
- Posts: 220
- Joined: Mon Aug 24, 2009 8:38 am
- Has thanked: 2 times
- Been thanked: 34 times
- Contact:
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: USB Slave examples
Updated component attached.
Please drop this into your Flowcode7 components directory
Please drop this into your Flowcode7 components directory
- Attachments
-
- USB_Slave.fcpx
- (17.75 KiB) Downloaded 255 times
-
- Flowcode V4 User
- Posts: 220
- Joined: Mon Aug 24, 2009 8:38 am
- Has thanked: 2 times
- Been thanked: 34 times
- Contact: