Browse Source

Fix compiler warnings with USB audio

teensy4-core
PaulStoffregen 8 years ago
parent
commit
39d9fdc386
3 changed files with 4 additions and 1 deletions
  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 View File

@@ -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 View File

@@ -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 View File

@@ -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…
Cancel
Save