English
Language : 

JDP2S01T Datasheet, PDF (24/150 Pages) Toshiba Semiconductor – UHF~VHF Band RF Attenuator Applications
Philips Semiconductors
ISP1362
Single-chip USB OTG controller
The following is a sample code for PIO access to internal control registers:
unsigned long read_reg32(unsigned char reg_no)
{
unsigned int result_l,result_h;
unsigned long result;
outport(hc_com, reg_no); // Command phase
result_l=inport(hc_data); // Data phase
result_h=inport(hc_data); // Data phase
result = result_h;
result = result<<16;
result = result+result_l;
return(result);
}
void write_reg32(unsigned char reg_no, unsigned long data2write)
{
unsigned int low_word;
unsigned int hi_word;
low_word=data2write&0x0000FFFF;
hi_word=(data2write&0xFFFF0000)>>16;
outport(hc_com,reg_no|0x80); // Command phase
outport(hc_data,low_word); // Data phase
outport(hc_data,hi_word); // Data phase
}
unsigned int read_reg16(unsigned char reg_no)
{
unsigned int result;
outport(hc_com, reg_no); // Command phase
result=inport(hc_data); // Data phase
return(result);
}
void write_reg16(unsigned char reg_no, unsigned int data2write)
{
outport(hc_com,reg_no|0x80); // Command phase
outport(hc_data,data2write); // Data phase
}
9.5 PIO access to the buffer memory
The buffer memory in the ISP1362 can be addressed using either the direct
addressing method or the indirect addressing method.
9.5.1 PIO access to the buffer memory by using direct addressing
This method uses the HcDirectAddressLength register to specify two parameters
required to randomly access the ISP1362 buffer memory (total of 4096 bytes). These
two parameters are:
9397 750 12337
Product data
Rev. 03 — 06 January 2004
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
24 of 150