diff options
| author | Harald Welte <laforge@gnumonks.org> | 2012-01-08 15:44:59 +0100 | 
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2012-01-08 15:44:59 +0100 | 
| commit | 6d19c32cb0bc311838a580d3ec07036ce492d843 (patch) | |
| tree | d2d5a25574eab1c4f5f955cff5112fa3f3147ee1 | |
| parent | 251a4109ff7366df6f6923d24d49b0b0759fd17a (diff) | |
remove lots of dead code
| -rw-r--r-- | usb-dfu-experiment/main.c | 74 | 
1 files changed, 0 insertions, 74 deletions
| diff --git a/usb-dfu-experiment/main.c b/usb-dfu-experiment/main.c index 001d8c7..d630494 100644 --- a/usb-dfu-experiment/main.c +++ b/usb-dfu-experiment/main.c @@ -68,13 +68,6 @@   *         Definitions   *----------------------------------------------------------------------------*/ -#if 0 -/**  Number of available audio buffers. */ -#define BUFFER_NUMBER       8 -/**  Size of one buffer in bytes. */ -#define BUFFER_SIZE         (AUDDLoopRecDriver_BYTESPERFRAME*2) -#endif -  /// Use for power management  #define STATE_IDLE    0  /// The USB device is in suspend state @@ -88,22 +81,6 @@  /// State of USB, for suspend and resume  unsigned char USBState = STATE_IDLE; -#if 0 -/**  Data buffers for receiving audio frames from the USB host. */ -static uint8_t buffers[BUFFER_NUMBER][BUFFER_SIZE]; -/**  Number of samples stored in each data buffer. */ -static uint32_t bufferSizes[BUFFER_NUMBER]; -/**  Next buffer in which USB data can be stored. */ -static uint32_t inBufferIndex = 0; -/**  Number of buffers that can be sent to the DAC. */ -static volatile uint32_t numBuffersToSend = 0; -#endif - -/**  Current state of the playback stream interface. */ -static volatile uint8_t isPlyActive = 0; -/**  Current state of the record stream interface. */ -static volatile uint8_t isRecActive = 0; -  /*----------------------------------------------------------------------------   *         VBus monitoring (optional)   *----------------------------------------------------------------------------*/ @@ -194,57 +171,6 @@ static void USBPower_Configure( void )  }  /*---------------------------------------------------------------------------- - *         Internal functions - *----------------------------------------------------------------------------*/ - -#if 0 -/** - *  Invoked when a frame has been received. - */ -static void FrameReceived(uint32_t unused, -                          uint8_t status, -                          uint32_t transferred, -                          uint32_t remaining) -{ -    if (status == USBD_STATUS_SUCCESS) -    { -        /* Loopback! add this buffer to write list */ -        if (!isRecActive)  {} -        else -        { -            AUDDLoopRecDriver_Write(buffers[inBufferIndex], -                                         AUDDLoopRecDriver_BYTESPERFRAME, -					 NULL, 0); -        } - -        /* Update input status data */ -        bufferSizes[inBufferIndex] = transferred -                                        / AUDDLoopRecDriver_BYTESPERSAMPLE; -        inBufferIndex = (inBufferIndex + 1) % BUFFER_NUMBER; -        numBuffersToSend++; - -    } -    else if (status == USBD_STATUS_ABORTED) -    { -        /* Error , ABORT, add NULL buffer */ -        bufferSizes[inBufferIndex] = 0; -        inBufferIndex = (inBufferIndex + 1) % BUFFER_NUMBER; -        numBuffersToSend++; -    } -    else -    { -        /* Packet is discarded */ -    } - -    /* Receive next packet */ -    AUDDLoopRecDriver_Read(buffers[inBufferIndex], -                           AUDDLoopRecDriver_BYTESPERFRAME, -                           (TransferCallback) FrameReceived, -                           0); // No optional argument -} -#endif - -/*----------------------------------------------------------------------------   *         Callbacks re-implementation   *----------------------------------------------------------------------------*/ | 
