瀏覽代碼

Fix compiler warnings with USB audio

main
PaulStoffregen 8 年之前
父節點
當前提交
39d9fdc386
共有 3 個文件被更改,包括 4 次插入1 次删除
  1. +1
    -1
      teensy3/usb_audio.cpp
  2. +1
    -0
      teensy3/usb_dev.c
  3. +2
    -0
      teensy3/usb_dev.h

+ 1
- 1
teensy3/usb_audio.cpp 查看文件

@@ -84,7 +84,7 @@ static void copy_to_buffers(const uint32_t *src, int16_t *left, int16_t *right,
while ((src < target - 2)) {
uint32_t n1 = *src++;
uint32_t n = *src++;
*(uint32_t *)left = n1 & 0xFFFF | ((n & 0xFFFF) << 16);
*(uint32_t *)left = (n1 & 0xFFFF) | ((n & 0xFFFF) << 16);
left+=2;
*(uint32_t *)right = (n1 >> 16) | ((n & 0xFFFF0000)) ;
right+=2;

+ 1
- 0
teensy3/usb_dev.c 查看文件

@@ -43,6 +43,7 @@
#include "kinetis.h"
//#include "HardwareSerial.h"
#include "usb_mem.h"
#include <string.h> // for memset

// buffer descriptor table


+ 2
- 0
teensy3/usb_dev.h 查看文件

@@ -106,6 +106,8 @@ extern uint8_t usb_audio_receive_setting;
extern uint8_t usb_audio_transmit_setting;
extern void usb_audio_receive_callback(unsigned int len);
extern unsigned int usb_audio_transmit_callback(void);
extern int usb_audio_get_feature(void *stp, uint8_t *data, uint32_t *datalen);
extern int usb_audio_set_feature(void *stp, uint8_t *buf);
#endif

#ifdef MULTITOUCH_INTERFACE

Loading…
取消
儲存