diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2013-01-18 18:18:30 -0500 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2013-01-18 18:18:30 -0500 |
commit | 70f704b96221cf1d0227304f30b43566d770db33 (patch) | |
tree | 8ba3b53983071cbe36b971a7474dc858d63479d9 /libmaple/usb/stm32f1 | |
parent | 369f98af8dfdf0cf7610e735883b12a151c78260 (diff) | |
download | librambutan-70f704b96221cf1d0227304f30b43566d770db33.tar.gz librambutan-70f704b96221cf1d0227304f30b43566d770db33.zip |
usb_cdcacm: Make USB lib globals weak symbols.
This allows users to override them.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/usb/stm32f1')
-rw-r--r-- | libmaple/usb/stm32f1/usb_cdcacm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libmaple/usb/stm32f1/usb_cdcacm.c b/libmaple/usb/stm32f1/usb_cdcacm.c index ecb9397..dfd8d56 100644 --- a/libmaple/usb/stm32f1/usb_cdcacm.c +++ b/libmaple/usb/stm32f1/usb_cdcacm.c @@ -309,16 +309,19 @@ static void (*ep_int_out[7])(void) = /* * Globals required by usb_lib/ + * + * Mark these weak so they can be overriden to implement other USB + * functionality. */ #define NUM_ENDPTS 0x04 -DEVICE Device_Table = { +__weak DEVICE Device_Table = { .Total_Endpoint = NUM_ENDPTS, .Total_Configuration = 1 }; #define MAX_PACKET_SIZE 0x40 /* 64B, maximum for USB FS Devices */ -DEVICE_PROP Device_Property = { +__weak DEVICE_PROP Device_Property = { .Init = usbInit, .Reset = usbReset, .Process_Status_IN = NOP_Process, @@ -333,7 +336,7 @@ DEVICE_PROP Device_Property = { .MaxPacketSize = MAX_PACKET_SIZE }; -USER_STANDARD_REQUESTS User_Standard_Requests = { +__weak USER_STANDARD_REQUESTS User_Standard_Requests = { .User_GetConfiguration = NOP_Process, .User_SetConfiguration = usbSetConfiguration, .User_GetInterface = NOP_Process, |