Преглед изворни кода

update(class): add weak api to avoid undefine symbol(not use such class but add)

Signed-off-by: sakumisu <1203593632@qq.com>
sakumisu пре 8 месеци
родитељ
комит
8aad86f66b
3 измењених фајлова са 55 додато и 0 уклоњено
  1. 12 0
      class/audio/usbd_audio.c
  2. 31 0
      class/msc/usbd_msc.c
  3. 12 0
      class/video/usbd_video.c

+ 12 - 0
class/audio/usbd_audio.c

@@ -375,3 +375,15 @@ __WEAK void usbd_audio_get_sampling_freq_table(uint8_t busid, uint8_t ep, uint8_
     (void)ep;
     (void)sampling_freq_table;
 }
+
+__WEAK void usbd_audio_open(uint8_t busid, uint8_t intf)
+{
+    (void)busid;
+    (void)intf;
+}
+
+__WEAK void usbd_audio_close(uint8_t busid, uint8_t intf)
+{
+    (void)busid;
+    (void)intf;
+}

+ 31 - 0
class/msc/usbd_msc.c

@@ -996,3 +996,34 @@ bool usbd_msc_get_popup(uint8_t busid)
 {
     return g_usbd_msc[busid].popup;
 }
+
+__WEAK void usbd_msc_get_cap(uint8_t busid, uint8_t lun, uint32_t *block_num, uint32_t *block_size)
+{
+    (void)busid;
+    (void)lun;
+
+    *block_num = 0;
+    *block_size = 0;
+}
+
+__WEAK int usbd_msc_sector_read(uint8_t busid, uint8_t lun, uint32_t sector, uint8_t *buffer, uint32_t length)
+{
+    (void)busid;
+    (void)lun;
+    (void)sector;
+    (void)buffer;
+    (void)length;
+
+    return 0;
+}
+
+__WEAK int usbd_msc_sector_write(uint8_t busid, uint8_t lun, uint32_t sector, uint8_t *buffer, uint32_t length)
+{
+    (void)busid;
+    (void)lun;
+    (void)sector;
+    (void)buffer;
+    (void)length;
+
+    return 0;
+}

+ 12 - 0
class/video/usbd_video.c

@@ -882,3 +882,15 @@ int usbd_video_stream_start_write(uint8_t busid, uint8_t ep, uint8_t *ep_buf0, u
     usbd_video_stream_split_transfer(busid, ep);
     return 0;
 }
+
+__WEAK void usbd_video_open(uint8_t busid, uint8_t intf)
+{
+    (void)busid;
+    (void)intf;
+}
+
+__WEAK void usbd_video_close(uint8_t busid, uint8_t intf)
+{
+    (void)busid;
+    (void)intf;
+}