Skip to content

Instantly share code, notes, and snippets.

@misaka4e21
Created August 29, 2017 08:02
Show Gist options
  • Save misaka4e21/79a41555ed74a31df169d569f8be5bd2 to your computer and use it in GitHub Desktop.
Save misaka4e21/79a41555ed74a31df169d569f8be5bd2 to your computer and use it in GitHub Desktop.
stm32f103c8t6 gnuk backup.
diff --git a/src/usb_lld.h b/src/usb_lld.h
index 2c7a931..74e2478 100644
--- a/src/usb_lld.h
+++ b/src/usb_lld.h
@@ -1,3 +1,5 @@
+#ifndef __HEHE__
+#define __HEHE__
#define USB_DEVICE_DESCRIPTOR_TYPE 0x01
#define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
#define USB_STRING_DESCRIPTOR_TYPE 0x03
@@ -128,12 +130,10 @@ extern void usb_lld_set_feature (uint8_t feature);
extern void usb_lld_set_data_to_send (const void *p, size_t len);
-extern inline void usb_lld_set_data_to_recv (void *p, size_t len)
-{
- usb_lld_set_data_to_send ((const void *)p, len);
-}
extern void usb_lld_prepare_shutdown (void);
extern void usb_lld_shutdown (void);
extern void usb_interrupt_handler (void);
+void usb_lld_set_data_to_recv (void *p, size_t len);
+#endif
diff --git a/src/usb_stm32f103.c b/src/usb_stm32f103.c
index 2c946eb..575894a 100644
--- a/src/usb_stm32f103.c
+++ b/src/usb_stm32f103.c
@@ -1189,3 +1189,7 @@ void usb_lld_from_pmabuf (void *dst, uint16_t addr, size_t n)
*d = (w & 0xff);
}
}
+void usb_lld_set_data_to_recv (void *p, size_t len)
+{
+ usb_lld_set_data_to_send ((const void *)p, len);
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment