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.
Summary of Contents for EX-USB FX3
Page 8: ...8 FX3 Programmers Manual Doc 001 64707 Rev C Contents...
Page 12: ...12 FX3 Programmers Manual Doc 001 64707 Rev C Introduction...
Page 48: ...48 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Overview...
Page 74: ...74 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Firmware...
Page 76: ...76 FX3 Programmers Manual Doc 001 64707 Rev C FX3 APIs...
Page 84: ...84 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Examples...
Page 98: ...98 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Application Structure...
Page 148: ...148 FX3 Programmers Manual Doc 001 64707 Rev C FX3 P Port Register Access...
Page 165: ...FX3 Programmers Manual Doc 001 64707 Rev C 165 FX3 Development Tools Click next...
Page 178: ...178 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools Click on Apply...
Page 180: ...180 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools d Start the GDB server...
Page 185: ...FX3 Programmers Manual Doc 001 64707 Rev C 185 FX3 Development Tools...
Page 186: ...186 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Page 187: ...FX3 Programmers Manual Doc 001 64707 Rev C 187 FX3 Development Tools...
Page 188: ...188 FX3 Programmers Manual Doc 001 64707 Rev C FX3 Development Tools...
Page 192: ...192 FX3 Programmers Manual Doc 001 64707 Rev C GPIF II Designer...