cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

Anonymous
Not applicable

 Hi

   

In TD_poll() of slave.c of An61345 example firmware code,

   

The IOC used like this  IOC |=0x01  But i dont understand. 

   

As i know, The IOC 's i/o initial direction is used by input. 

   

So IOC register can read on input direction, but example code show that IOC can write like this  IOC |=0x01. 

   

Is this something wrong what write data to input register ?

0 Likes
Reply
1 Reply
Anonymous
Not applicable

 Hi,

   

 

   

In fw.c you can see that PC.0 is configured as an Output pin and PC.1 as input as below:

   

 

   

OEC|=0x01; //PC.0 as output (SYNC signal)

   

SYNCDELAY;

   

OEC&=0xFD; //PC.1 as input (Clock changing signal)

   

 

   

SYNCDELAY;

   

 

   

It is the OEC register that determines which pin of port C acts as input, and which as output. 

   

 

   

Regards,

   

Gayathri

0 Likes
Reply