Sfoglia il codice sorgente

Fix compiler warnings with USB audio

main
PaulStoffregen 8 anni fa
parent
commit
39d9fdc386
3 ha cambiato i file con 4 aggiunte e 1 eliminazioni
  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 Vedi 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 Vedi 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 Vedi 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…
Annulla
Salva