EasyManua.ls Logo

Cypress EX-USB FX3 - 8. FX3 Application Structure; 8.1 Application code structure; 8.1.1 Initialization Code

Cypress EX-USB FX3
192 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
FX3 Programmers Manual, Doc. # 001-64707 Rev. *C 85
8. FX3 Application Structure
All FX3 application code will consist of two parts
Initialization code - This will be mostly common to all applications
Application code - This will be the application specific code
The Slave FIFO loop application (Slave FIFO Sync) is taken as an example to present the FX3
application structure. All the sample code shown below is from this example.
8.1 Application code structure
The Slave FIFO example comprises of the following files:
1. cyfxgpif_syncsf.h: This file contains the GPIF-II descriptors for the 16-bit and 32-bit Slave FIFO
interface.
2. cyfxslfifousbdscr.c: This file contains the USB descriptors
3. cyfxslfifosync.h: This file contains the defines used in cyfxslfifosync.c. The constant
CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT is defined in this file. 0 will select 16 bit and
1 will select 32 bit. This constant is also used to configure the IO matrix for 16/32 bit GPIF in
cyfxslfifosync.c.
4. cyfxslfifosync.c: This file contains the main application logic of the Slave FIFO example. The
application is explained in the subsequent sections.
8.1.1 Initialization Code
The figure below shows the initialization sequence of an FX3 application. Each of the main
initialization blocks is explained below.

Table of Contents