cancel
Showing results for 
Search instead for 
Did you mean: 

USB Hosts Hubs Transceivers

Anonymous
Not applicable
        the problems is   
0 Likes
4 Replies
Anonymous
Not applicable

 Hi,

   

 

   

There is no description about your problem.

   

 

   

It is better to create a new thread in the http://www.cypress.com/?app=forum&id=167&rID=42098

   

 

   

Regards,

   

Vikas

0 Likes
Anonymous
Not applicable

the problem is how to use some API functions of USB in the chip 69213

   

the datashet said:

   

void USB_XLoadEP(BYTE*pSrc)
Loads and enables the specified USB endpoint for an IN transfer. Note USB_XLoadEP should not be call directly. Rather, the macro USB_LoadEP should be used.

   

it said again:
C Macro
USB_LoadEP(BYTE bEP, BYTE *pSrc, BYTE count)
Loads and enables the specified USB endpoint for an IN transfer.

   

we write program in our project:

   

#include <m8c.h>        // part specific constants and macros
#include "PSoCAPI.h"    // PSoC API definitions for all User Modules

   

 keyboard_report[8] = {0,0,0,0,0,0,0,0};
 int usb_send_flag,usbloadin_clr_flag = 0;
 BYTE spi_receive_num,spi_rec_flag;
 BYTE spi_rec_value0,spi_rec_value1,spi_rec_value2;

   

 
void delay(void)
{
    int j,k;
  for(k=0;k<=22;k++)
  {
     for(j=0;j<=1000;j++) asm("NOP"); //397
  }
}
 
 
void main(void)
{
 BYTE bUsbActive;
 // M8C_EnableGInt ; // Uncomment this line to enable Global Interrupts
 M8C_EnableGInt; //Enable Global Interrupts

   

 // Insert your main routine code here.
 USB_Start(0);
 USB_Stop();
 USB_Start(0);
 USB_bCheckActivity();
 while(1)
 {
  keyboard_report[2]=6;
  USB_LoadEP(1, keyboard_report, 8);
  delay();
  
  keyboard_report[2]=7;
  USB_LoadEP(1, keyboard_report, 8);
  delay();
  
  keyboard_report[2]=8;
  USB_LoadEP(1, keyboard_report, 8);  
  delay();delay();delay();
    }
}

   


the result of compile is as below:

   

 

   

!E D:\1PSOC2~1\WIRELESS\F18_WL~1\F18_WL~1\F18_WL~1\main.c(38): type error in argument 1 to `USB_XLoadEP'; found `pointer to int' expected `pointer to unsigned char'
!E D:\1PSOC2~1\WIRELESS\F18_WL~1\F18_WL~1\F18_WL~1\main.c(42): type error in argument 1 to `USB_XLoadEP'; found `pointer to int' expected `pointer to unsigned char'
!E D:\1PSOC2~1\WIRELESS\F18_WL~1\F18_WL~1\F18_WL~1\main.c(46): type error in argument 1 to `USB_XLoadEP'; found `pointer to int' expected `pointer to unsigned char'
make: *** [obj/main.o] Error 1
main.o - 4 error(s) 0 warning(s)  10:24:26

   

 

   

how can we pass the project?

0 Likes
Anonymous
Not applicable

by the way, we use psoc designer 5.4

0 Likes
Anonymous
Not applicable

it is a pity that the post can not be  edit,.

0 Likes