Upgrade Doxygen configuration files for Doxygen 1.8.1, fix broken stylesheet and footer HTML, add explicit spacing into documentation code fragments to prevent Doxygen from removing empty lines in the output.
This commit is contained in:
parent
c9b3468f1e
commit
f2ae4dc255
106 changed files with 1388 additions and 1800 deletions
|
|
@ -68,13 +68,13 @@
|
|||
* \code
|
||||
* // Initialize the button driver before first use
|
||||
* Buttons_Init();
|
||||
*
|
||||
*
|
||||
* printf("Waiting for button press...\r\n");
|
||||
*
|
||||
*
|
||||
* // Loop until a board button has been pressed
|
||||
* uint8_t ButtonPress;
|
||||
* while (!(ButtonPress = Buttons_GetStatus())) {};
|
||||
*
|
||||
*
|
||||
* // Display which button was pressed (assuming two board buttons)
|
||||
* printf("Button pressed: %s\r\n", (ButtonPress == BUTTONS_BUTTON1) ? "Button 1" : "Button 2");
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -70,44 +70,44 @@
|
|||
* SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING |
|
||||
* SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
|
||||
* Dataflash_Init();
|
||||
*
|
||||
*
|
||||
* uint8_t WriteBuffer[DATAFLASH_PAGE_SIZE];
|
||||
* uint8_t ReadBuffer[DATAFLASH_PAGE_SIZE];
|
||||
*
|
||||
*
|
||||
* // Fill page write buffer with a repeating pattern
|
||||
* for (uint16_t i = 0; i < DATAFLASH_PAGE_SIZE; i++)
|
||||
* WriteBuffer[i] = (i & 0xFF);
|
||||
*
|
||||
*
|
||||
* // Must select the chip of interest first before operating on it
|
||||
* Dataflash_SelectChip(DATAFLASH_CHIP1);
|
||||
*
|
||||
*
|
||||
* // Write to the Dataflash's first internal memory buffer
|
||||
* printf("Writing data to first dataflash buffer:\r\n");
|
||||
* Dataflash_SendByte(DF_CMD_BUFF1WRITE);
|
||||
* Dataflash_SendAddressBytes(0, 0);
|
||||
*
|
||||
*
|
||||
* for (uint16_t i = 0; i < DATAFLASH_PAGE_SIZE; i++)
|
||||
* Dataflash_SendByte(WriteBuffer[i]);
|
||||
*
|
||||
*
|
||||
* // Commit the Dataflash's first memory buffer to the non-volatile FLASH memory
|
||||
* printf("Committing page to non-volatile memory page index 5:\r\n");
|
||||
* Dataflash_SendByte(DF_CMD_BUFF1TOMAINMEMWITHERASE);
|
||||
* Dataflash_SendAddressBytes(5, 0);
|
||||
* Dataflash_WaitWhileBusy();
|
||||
*
|
||||
*
|
||||
* // Read the page from non-volatile FLASH memory into the Dataflash's second memory buffer
|
||||
* printf("Reading data into second dataflash buffer:\r\n");
|
||||
* Dataflash_SendByte(DF_CMD_MAINMEMTOBUFF2);
|
||||
* Dataflash_SendAddressBytes(5, 0);
|
||||
* Dataflash_WaitWhileBusy();
|
||||
*
|
||||
*
|
||||
* // Read the Dataflash's second internal memory buffer
|
||||
* Dataflash_SendByte(DF_CMD_BUFF2READ);
|
||||
* Dataflash_SendAddressBytes(0, 0);
|
||||
*
|
||||
*
|
||||
* for (uint16_t i = 0; i < DATAFLASH_PAGE_SIZE; i++)
|
||||
* ReadBuffer[i] = Dataflash_ReceiveByte();
|
||||
*
|
||||
*
|
||||
* // Deselect the chip after use
|
||||
* Dataflash_DeselectChip();
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -67,22 +67,22 @@
|
|||
* \code
|
||||
* // Initialize the board Joystick driver before first use
|
||||
* Joystick_Init();
|
||||
*
|
||||
*
|
||||
* printf("Waiting for joystick movement...\r\n");
|
||||
*
|
||||
*
|
||||
* // Loop until a the joystick has been moved
|
||||
* uint8_t JoystickMovement;
|
||||
* while (!(JoystickMovement = Joystick_GetStatus())) {};
|
||||
*
|
||||
*
|
||||
* // Display which direction the joystick was moved in
|
||||
* printf("Joystick moved:\r\n");
|
||||
*
|
||||
*
|
||||
* if (JoystickMovement & (JOY_UP | JOY_DOWN))
|
||||
* printf("%s ", (JoystickMovement & JOY_UP) ? "Up" : "Down");
|
||||
*
|
||||
*
|
||||
* if (JoystickMovement & (JOY_LEFT | JOY_RIGHT))
|
||||
* printf("%s ", (JoystickMovement & JOY_LEFT) ? "Left" : "Right");
|
||||
*
|
||||
*
|
||||
* if (JoystickMovement & JOY_PRESS)
|
||||
* printf("Pressed");
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
* \code
|
||||
* // Initialize the board LED driver before first use
|
||||
* LEDs_Init();
|
||||
*
|
||||
*
|
||||
* // Turn on each of the four LEDs in turn
|
||||
* LEDs_SetAllLEDs(LEDS_LED1);
|
||||
* Delay_MS(500);
|
||||
|
|
@ -86,11 +86,11 @@
|
|||
* Delay_MS(500);
|
||||
* LEDs_SetAllLEDs(LEDS_LED4);
|
||||
* Delay_MS(500);
|
||||
*
|
||||
*
|
||||
* // Turn on all LEDs
|
||||
* LEDs_SetAllLEDs(LEDS_ALL_LEDS);
|
||||
* Delay_MS(1000);
|
||||
*
|
||||
*
|
||||
* // Turn on LED 1, turn off LED 2, leaving LEDs 3 and 4 in their current state
|
||||
* LEDs_ChangeLEDs((LEDS_LED1 | LEDS_LED2), LEDS_LED1);
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
* // Initialize the ADC and board temperature sensor drivers before first use
|
||||
* ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_128);
|
||||
* Temperature_Init();
|
||||
*
|
||||
*
|
||||
* // Display converted temperature in degrees Celsius
|
||||
* printf("Current Temperature: %d Degrees\r\n", Temperature_GetTemperature());
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -65,23 +65,23 @@
|
|||
* // Create the buffer structure and its underlying storage array
|
||||
* RingBuffer_t Buffer;
|
||||
* uint8_t BufferData[128];
|
||||
*
|
||||
*
|
||||
* // Initialize the buffer with the created storage array
|
||||
* RingBuffer_InitBuffer(&Buffer, BufferData, sizeof(BufferData));
|
||||
*
|
||||
*
|
||||
* // Insert some data into the buffer
|
||||
* RingBuffer_Insert(Buffer, 'H');
|
||||
* RingBuffer_Insert(Buffer, 'E');
|
||||
* RingBuffer_Insert(Buffer, 'L');
|
||||
* RingBuffer_Insert(Buffer, 'L');
|
||||
* RingBuffer_Insert(Buffer, 'O');
|
||||
*
|
||||
*
|
||||
* // Cache the number of stored bytes in the buffer
|
||||
* uint16_t BufferCount = RingBuffer_GetCount(&Buffer);
|
||||
*
|
||||
*
|
||||
* // Printer stored data length
|
||||
* printf("Buffer Length: %d, Buffer Data: \r\n", BufferCount);
|
||||
*
|
||||
*
|
||||
* // Print contents of the buffer one character at a time
|
||||
* while (BufferCount--)
|
||||
* putc(RingBuffer_Remove(&Buffer));
|
||||
|
|
|
|||
|
|
@ -55,14 +55,14 @@
|
|||
* \code
|
||||
* // Initialize the ADC driver before first use
|
||||
* ADC_Init(ADC_FREE_RUNNING | ADC_PRESCALE_32);
|
||||
*
|
||||
*
|
||||
* // Must setup the ADC channel to read beforehand
|
||||
* ADC_SetupChannel(1);
|
||||
*
|
||||
*
|
||||
* // Perform a single conversion of the ADC channel 1
|
||||
* ADC_GetChannelReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_CHANNEL1);
|
||||
* printf("Conversion Result: %d\r\n", ADC_GetResult());
|
||||
*
|
||||
*
|
||||
* // Start reading ADC channel 1 in free running (continuous conversion) mode
|
||||
* ADC_StartReading(ADC_REFERENCE_AVCC | ADC_RIGHT_ADJUSTED | ADC_CHANNEL1);
|
||||
* for (;;)
|
||||
|
|
|
|||
|
|
@ -56,17 +56,17 @@
|
|||
* // Initialize the SPI driver before first use
|
||||
* SPI_Init(SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING |
|
||||
* SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
|
||||
*
|
||||
*
|
||||
* // Send several bytes, ignoring the returned data
|
||||
* SPI_SendByte(0x01);
|
||||
* SPI_SendByte(0x02);
|
||||
* SPI_SendByte(0x03);
|
||||
*
|
||||
*
|
||||
* // Receive several bytes, sending a dummy 0x00 byte each time
|
||||
* uint8_t Byte1 = SPI_ReceiveByte();
|
||||
* uint8_t Byte2 = SPI_ReceiveByte();
|
||||
* uint8_t Byte3 = SPI_ReceiveByte();
|
||||
*
|
||||
*
|
||||
* // Send a byte, and store the received byte from the same transaction
|
||||
* uint8_t ResponseByte = SPI_TransferByte(0xDC);
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -53,17 +53,17 @@
|
|||
* \code
|
||||
* // Initialize the Master SPI mode USART driver before first use, with 1Mbit baud
|
||||
* SerialSPI_Init((USART_SPI_SCK_LEAD_RISING | SPI_SAMPLE_LEADING | SPI_ORDER_MSB_FIRST), 1000000);
|
||||
*
|
||||
*
|
||||
* // Send several bytes, ignoring the returned data
|
||||
* SerialSPI_SendByte(0x01);
|
||||
* SerialSPI_SendByte(0x02);
|
||||
* SerialSPI_SendByte(0x03);
|
||||
*
|
||||
*
|
||||
* // Receive several bytes, sending a dummy 0x00 byte each time
|
||||
* uint8_t Byte1 = SerialSPI_ReceiveByte();
|
||||
* uint8_t Byte2 = SerialSPI_ReceiveByte();
|
||||
* uint8_t Byte3 = SerialSPI_ReceiveByte();
|
||||
*
|
||||
*
|
||||
* // Send a byte, and store the received byte from the same transaction
|
||||
* uint8_t ResponseByte = SerialSPI_TransferByte(0xDC);
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@
|
|||
* \code
|
||||
* // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode)
|
||||
* Serial_Init(9600, false);
|
||||
*
|
||||
*
|
||||
* // Send a string through the USART
|
||||
* Serial_TxString("Test String\r\n");
|
||||
*
|
||||
*
|
||||
* // Receive a byte through the USART
|
||||
* uint8_t DataByte = Serial_RxByte();
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -54,35 +54,35 @@
|
|||
* \code
|
||||
* // Initialize the TWI driver before first use at 200KHz
|
||||
* TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 200000));
|
||||
*
|
||||
*
|
||||
* // Start a write session to device at device address 0xA0, internal address 0xDC with a 10ms timeout
|
||||
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10) == TWI_ERROR_NoError)
|
||||
* {
|
||||
* TWI_SendByte(0xDC);
|
||||
*
|
||||
*
|
||||
* TWI_SendByte(0x01);
|
||||
* TWI_SendByte(0x02);
|
||||
* TWI_SendByte(0x03);
|
||||
*
|
||||
*
|
||||
* // Must stop transmission afterwards to release the bus
|
||||
* TWI_StopTransmission();
|
||||
* }
|
||||
*
|
||||
*
|
||||
* // Start a read session to device at address 0xA0, internal address 0xDC with a 10ms timeout
|
||||
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_WRITE, 10) == TWI_ERROR_NoError)
|
||||
* {
|
||||
* TWI_SendByte(0xDC);
|
||||
* TWI_StopTransmission();
|
||||
*
|
||||
*
|
||||
* if (TWI_StartTransmission(0xA0 | TWI_ADDRESS_READ, 10) == TWI_ERROR_NoError)
|
||||
* {
|
||||
* uint8_t Byte1, Byte2, Byte3;
|
||||
*
|
||||
*
|
||||
* // Read three bytes, acknowledge after the third byte is received
|
||||
* TWI_ReceiveByte(&Byte1, false);
|
||||
* TWI_ReceiveByte(&Byte2, false);
|
||||
* TWI_ReceiveByte(&Byte3, true);
|
||||
*
|
||||
*
|
||||
* // Must stop transmission afterwards to release the bus
|
||||
* TWI_StopTransmission();
|
||||
* }
|
||||
|
|
@ -93,18 +93,18 @@
|
|||
* \code
|
||||
* // Initialize the TWI driver before first use at 200KHz
|
||||
* TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 200000));
|
||||
*
|
||||
*
|
||||
* // Start a write session to device at device address 0xA0, internal address 0xDC with a 10ms timeout
|
||||
* uint8_t InternalWriteAddress = 0xDC;
|
||||
* uint8_t WritePacket[3] = {0x01, 0x02, 0x03};
|
||||
*
|
||||
*
|
||||
* TWI_WritePacket(0xA0, 10, &InternalWriteAddress, sizeof(InternalWriteAddress),
|
||||
* &WritePacket, sizeof(WritePacket);
|
||||
*
|
||||
*
|
||||
* // Start a read session to device at address 0xA0, internal address 0xDC with a 10ms timeout
|
||||
* uint8_t InternalReadAddress = 0xDC;
|
||||
* uint8_t ReadPacket[3];
|
||||
*
|
||||
*
|
||||
* TWI_ReadPacket(0xA0, 10, &InternalReadAddress, sizeof(InternalReadAddress),
|
||||
* &ReadPacket, sizeof(ReadPacket);
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -53,17 +53,17 @@
|
|||
* SPI_Init(&SPIC,
|
||||
* SPI_SPEED_FCPU_DIV_2 | SPI_ORDER_MSB_FIRST | SPI_SCK_LEAD_FALLING |
|
||||
* SPI_SAMPLE_TRAILING | SPI_MODE_MASTER);
|
||||
*
|
||||
*
|
||||
* // Send several bytes, ignoring the returned data
|
||||
* SPI_SendByte(&SPIC, 0x01);
|
||||
* SPI_SendByte(&SPIC, 0x02);
|
||||
* SPI_SendByte(&SPIC, 0x03);
|
||||
*
|
||||
*
|
||||
* // Receive several bytes, sending a dummy 0x00 byte each time
|
||||
* uint8_t Byte1 = SPI_ReceiveByte(&SPIC);
|
||||
* uint8_t Byte2 = SPI_ReceiveByte(&SPIC);
|
||||
* uint8_t Byte3 = SPI_ReceiveByte(&SPIC);
|
||||
*
|
||||
*
|
||||
* // Send a byte, and store the received byte from the same transaction
|
||||
* uint8_t ResponseByte = SPI_TransferByte(&SPIC, 0xDC);
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -53,17 +53,17 @@
|
|||
* \code
|
||||
* // Initialize the Master SPI mode USART driver before first use, with 1Mbit baud
|
||||
* SerialSPI_Init(&USARTD0, (USART_SPI_SCK_LEAD_RISING | USART_SPI_SAMPLE_LEADING | USART_SPI_ORDER_MSB_FIRST), 1000000);
|
||||
*
|
||||
*
|
||||
* // Send several bytes, ignoring the returned data
|
||||
* SerialSPI_SendByte(&USARTD0, 0x01);
|
||||
* SerialSPI_SendByte(&USARTD0, 0x02);
|
||||
* SerialSPI_SendByte(&USARTD0, 0x03);
|
||||
*
|
||||
*
|
||||
* // Receive several bytes, sending a dummy 0x00 byte each time
|
||||
* uint8_t Byte1 = SerialSPI_ReceiveByte(&USARTD);
|
||||
* uint8_t Byte2 = SerialSPI_ReceiveByte(&USARTD);
|
||||
* uint8_t Byte3 = SerialSPI_ReceiveByte(&USARTD);
|
||||
*
|
||||
*
|
||||
* // Send a byte, and store the received byte from the same transaction
|
||||
* uint8_t ResponseByte = SerialSPI_TransferByte(&USARTD0, 0xDC);
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@
|
|||
* \code
|
||||
* // Initialize the serial USART driver before first use, with 9600 baud (and no double-speed mode)
|
||||
* Serial_Init(&USARTD0, 9600, false);
|
||||
*
|
||||
*
|
||||
* // Send a string through the USART
|
||||
* Serial_TxString(&USARTD0, "Test String\r\n");
|
||||
*
|
||||
*
|
||||
* // Receive a byte through the USART
|
||||
* uint8_t DataByte = Serial_RxByte(&USARTD0);
|
||||
* \endcode
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -98,13 +98,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -151,13 +151,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -276,7 +276,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -289,14 +289,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -96,13 +96,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -148,13 +148,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -211,14 +211,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -292,14 +292,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
* uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
|
||||
* USB_Descriptor_Configuration_Header_t* ConfigHeaderPtr = DESCRIPTOR_PCAST(CurrDescriptor,
|
||||
* USB_Descriptor_Configuration_Header_t);
|
||||
*
|
||||
*
|
||||
* // Can now access elements of the configuration header struct using the -> indirection operator
|
||||
* \endcode
|
||||
*/
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
* uint8_t* CurrDescriptor = &ConfigDescriptor[0]; // Pointing to the configuration header
|
||||
* USB_Descriptor_Configuration_Header_t ConfigHeader = DESCRIPTOR_CAST(CurrDescriptor,
|
||||
* USB_Descriptor_Configuration_Header_t);
|
||||
*
|
||||
*
|
||||
* // Can now access elements of the configuration header struct using the . operator
|
||||
* \endcode
|
||||
*/
|
||||
|
|
@ -231,7 +231,7 @@
|
|||
* Usage Example:
|
||||
* \code
|
||||
* uint8_t EndpointSearcher(void* CurrentDescriptor); // Comparator Prototype
|
||||
*
|
||||
*
|
||||
* uint8_t EndpointSearcher(void* CurrentDescriptor)
|
||||
* {
|
||||
* if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Endpoint)
|
||||
|
|
@ -239,8 +239,9 @@
|
|||
* else
|
||||
* return DESCRIPTOR_SEARCH_NotFound;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* //...
|
||||
*
|
||||
* // After retrieving configuration descriptor:
|
||||
* if (USB_Host_GetNextDescriptorComp(&BytesRemaining, &CurrentConfigLoc, EndpointSearcher) ==
|
||||
* Descriptor_Search_Comp_Found)
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -98,13 +98,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -151,13 +151,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -212,14 +212,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -276,7 +276,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -289,14 +289,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
|
|||
|
|
@ -85,24 +85,24 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Discard_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
* }
|
||||
* \endcode
|
||||
*
|
||||
*
|
||||
* <b>Partial Stream Transfers Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Discard_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -137,7 +137,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Null_Stream(512, NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -148,13 +148,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Null_Stream(512, &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -211,14 +211,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -279,7 +279,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -292,14 +292,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Pipe_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == PIPE_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != PIPE_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Discard_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -98,13 +98,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Discard_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -140,7 +140,7 @@
|
|||
* <b>Single Stream Transfer Example:</b>
|
||||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Null_Stream(512, NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -151,13 +151,13 @@
|
|||
* \code
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Null_Stream(512, &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -212,14 +212,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Write_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
@ -276,7 +276,7 @@
|
|||
* \code
|
||||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
*
|
||||
*
|
||||
* if ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* NULL)) != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
|
|
@ -289,14 +289,14 @@
|
|||
* uint8_t DataStream[512];
|
||||
* uint8_t ErrorCode;
|
||||
* uint16_t BytesProcessed;
|
||||
*
|
||||
*
|
||||
* BytesProcessed = 0;
|
||||
* while ((ErrorCode = Endpoint_Read_Stream_LE(DataStream, sizeof(DataStream),
|
||||
* &BytesProcessed)) == ENDPOINT_RWSTREAM_IncompleteTransfer)
|
||||
* {
|
||||
* // Stream not yet complete - do other actions here, abort if required
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (ErrorCode != ENDPOINT_RWSTREAM_NoError)
|
||||
* {
|
||||
* // Stream failed to complete - check ErrorCode here
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@
|
|||
* void EVENT_USB_Device_ConfigurationChanged(void)
|
||||
* {
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_READY);
|
||||
*
|
||||
*
|
||||
* if (!(Audio_Device_ConfigureEndpoints(&My_Audio_Interface)))
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
* }
|
||||
|
|
@ -205,14 +205,14 @@
|
|||
* int main(void)
|
||||
* {
|
||||
* SetupHardware();
|
||||
*
|
||||
*
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
*
|
||||
*
|
||||
* for (;;)
|
||||
* {
|
||||
* if (USB_DeviceState != DEVICE_STATE_Configured)
|
||||
* Create_And_Process_Samples();
|
||||
*
|
||||
*
|
||||
* Audio_Device_USBTask(&My_Audio_Interface);
|
||||
* USB_USBTask();
|
||||
* }
|
||||
|
|
@ -293,30 +293,30 @@
|
|||
* void EVENT_USB_Host_DeviceEnumerationComplete(void)
|
||||
* {
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_ENUMERATING);
|
||||
*
|
||||
*
|
||||
* uint16_t ConfigDescriptorSize;
|
||||
* uint8_t ConfigDescriptorData[512];
|
||||
*
|
||||
*
|
||||
* if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,
|
||||
* sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)
|
||||
* {
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (MIDI_Host_ConfigurePipes(&Keyboard_MIDI_Interface,
|
||||
* ConfigDescriptorSize, ConfigDescriptorData) != MIDI_ENUMERROR_NoError)
|
||||
* {
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)
|
||||
* {
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||
* return;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_READY);
|
||||
* }
|
||||
* \endcode
|
||||
|
|
@ -342,14 +342,14 @@
|
|||
* int main(void)
|
||||
* {
|
||||
* SetupHardware();
|
||||
*
|
||||
*
|
||||
* LEDs_SetAllLEDs(LEDMASK_USB_NOTREADY);
|
||||
*
|
||||
*
|
||||
* for (;;)
|
||||
* {
|
||||
* if (USB_HostState != HOST_STATE_Configured)
|
||||
* Create_And_Process_Samples();
|
||||
*
|
||||
*
|
||||
* MIDI_Host_USBTask(&My_Audio_Interface);
|
||||
* USB_USBTask();
|
||||
* }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue