Interconnectivity
Page 13 of 22
Firmware Programming Guide for PDIUSBD12
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
5.3 Generic Endpoint Handler
The Generic Out Endpoint has been configured to receive data packet from the host, which interprets it as LED
Control data. When MCU receives the Generic_Out token from the host (identified through the Read Interrupt
Register), the D12 interrupt bit has to be cleared. The Select Endpoint will clear the Generic_Out buffer and
then the buffer sequence. Next, MCU will need to verify the data length and interpret the data.
For Generic_In Endpoint, this endpoint has been configured to send the information of the button activity as a
byte to the host.
5.4 Main Endpoint Handler
Since the Main In/Out Endpoints are configured to the DMA mode and the interrupts are disabled for these
endpoints, no ISR services are normally required for these endpoints. However, for safer code implementation,
we have put in place clear interrupt routine here.
5.5 EOT Handler
For more information on EOT handler, please refer to the section "DMA Support".
Generic Out Handler
Clear Generic Out Interrupt Bit
Read and Clear Generic Out Buffer
Data Length = 0?
No
Save the Data and Set bEPPFlag Bit
End of Generic Out Handler
Yes
Generic In Handler
Clear Generic In Interrupt Bit
End of Generic In Handler
Main Out Handler
Clear Main Out Interrupt Bit
End of Main Out Handler
Main In Handler
Clear Main In Interrupt Bit
End of Main In Handler