Integrating two projects | Cypress Semiconductor
Integrating two projects
I would like to integarte two projects: the one with which has two interrupt endpoints (one IN and one OUT and is working correctly) and slave FIFO. At the begining, I made the changes in the "cyfxslfifousbdscr.c" as you suggested in http://www.cypress.com/?app=forum&id=167&rID=58209.
Using Control Center, the cypress was correctly recognized as 2 interrupt endpoints and 2 bulk endpoints.
Then, I integrated *.c files (cyfxslfifosync.c), which caused the cypress not to be recognized by windows anymore. Is there any example that shows how to integrate two *.c files. For instance,
1. Does it matter in which order I initialize the p-port vs the gpio or define the device descriptors, ect,...
2. Should I define one thread_Entry or two? (the interrupt endpoints are totally independent from the bulk endpoints)
3. Should I have two ApplicationDefine or one?
4. Should I define two threads?
5. Is this correct to have such an IO configuration:
io_cfg.isDQ32Bit = CyTrue;
io_cfg.useUart = CyTrue;
io_cfg.useI2C = CyFalse;
io_cfg.useI2S = CyFalse;
io_cfg.useSpi = CyFalse;
io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_DEFAULT;
6. Can I have the combinaiton of the buffers and threads as:
#define CY_FX_INTRLP_DMA_BUF_COUNT (8) /* Interrupt loop channel buffer count */
#define CY_FX_INTRLP_DMA_TX_SIZE (0) /* DMA transfer size is set to infinite */
#define CY_FX_INTRLP_THREAD_STACK (0x1000) /* Interrupt loop application thread stack size */
#define CY_FX_INTRLP_THREAD_PRIORITY (8) /* Interrupt loop application thread priority */
#define CY_FX_SLFIFO_DMA_BUF_COUNT (2) /* Slave FIFO channel buffer count */
#define CY_FX_SLFIFO_DMA_TX_SIZE (0) /* DMA transfer size is set to infinite */
#define CY_FX_SLFIFO_THREAD_STACK (0x0400) /* Slave FIFO application thread stack size */
#define CY_FX_SLFIFO_THREAD_PRIORITY (8) /* Slave FIFO application thread priority */
I also should mention that I already added the cygpif_syncf.h to the project.
Any suggestion is highly appreciated.