|

|
|
|
INtime
Tech
INtime Top
USB
system
INtime¿¡ ÀÖ¾î¼ÀÇ USB
¼Æ÷Æ®
ÇöÀçÀÇ PC¾ÆÅ°ÅØÃÄ¿¡ ´ëÇØ
USB(Universal Serial Bus)´Â °¡Àå ¿ëÀÌÇÑ ±â±â Áõ¼³ ¼ö´ÜÀÌ µÇ¾î ÀÖ½À´Ï´Ù. INtime¿¡¼´Â USB ±â±â¸¦ Á¦¾îÇϱâ À§ÇÑ ±â±¸¿Í ÀÎÅÍÆäÀ̽º ÇÔ¼ö¸¦
Ç¥ÁØ Á¦°øÇϰí ÀÖ¾î, ¸ñÀûÀÇ USB ±â±â¸¦ Á¦¾îÇÏ´Â ÇÁ·Î±×·¥À» Á¦ÀÛÇÒ ¼ö ÀÖ´Â ±â¹ÝÀÌ Ç¥ÁØ Á¦°øµÇ°í
ÀÖ½À´Ï´Ù.
INtimeÀÇ USB
¾ÆÅ°ÅØÃÄ
Á¢¼ÓµÇ´Â USB ±â±â´Â
ÀϹÝÀûÀ¸·Î Ĩ ¼¼Æ®¿¡ ³»ÀåµÇ°í ÀÖ´Â USB È£½ºÆ® ÄÜÆ®·Ñ·¯ ÀÎÅÍÆäÀ̽º(HCI)¿¡ ÀÇÇØ USB ¹ö½ºÀÇ Åë½ÅÀÌ Åë°ýµË´Ï´Ù. USB È£½ºÆ®
ÄÜÆ®·Ñ·¯´Â ÃÖ´ë 12 Mbps¸¦ ½ÇÇöÇÏ´Â USB1. 1À» À§ÇÑ UHCI(ȤÀº OHCI)¿Í ÃÖ´ë 480 Mbps¸¦ ½ÇÇöÇÏ´Â USB2. 0À» À§ÇÑ
EHCIÀÇ ÄÜÆ®·Ñ·¯·Î ±¸¼ºµÇ¾î ÀÖ½À´Ï´Ù.

±×¸²Àº INtime¿¡
ÀÖ¾î¼ÀÇ USB ¼Æ÷Æ®ÀÇ ±¸Á¶¸¦ ºí·ÏÀ¸·Î ³ªÅ¸³» º¸À̰í ÀÖ½À´Ï´Ù. ¿ÞÂÊÀÇ ºí·ÏÀÌ È£½ºÆ®(Á¦¾î PC) Ãø¿¡¼, ¿À¸¥ÂÊÀÇ ºí·ÏÀÌ USB ±â±â¸¦
ÀǹÌÇÕ´Ï´Ù.
ÇÏÃþÀº Çϵå¿þ¾îÀÇ ·¹À̾ ³ªÅ¸³»°í ÀÖ½À´Ï´Ù. HCI¿¡
ÀÇÇØ USB ¹ö½º ÀüüÀÇ ¹°¸®Àû·Àü±âÀûÀÎ Åë½Å Á¢¼ÓÀÌ °ü¸®µË´Ï´Ù.
ÁßÃþÀÇ¡± USBSS¡±(USB Sub System)´Â
INtimeÀÌ Ç¥ÁØ ½ÇÀåÇϰí ÀÖ´Â ½Ã½ºÅÛ ÇÁ·Î¼¼½º·Î, HCI¸¦ Á¦¾îÇØ, USB ±â±âÀÇ Á¢¼Ó °ü¸®¿Í Èļú ÇÏ´Â USB Ŭ¶óÀÌ¾ðÆ® ÇÁ·Î±×·¥ÀÇ °ü¸®¸¦
Á¶´ÞÇÏ´Â ¿äÁ¡ÀÌ µÇ´Â ºÎºÐÀÔ´Ï´Ù. »óÃþÀº Ÿ°ÙÀÌ µÇ´Â USB ±â±â°¡ °¡Áö´Â
±â´É(Function)°ú ±×°ÍÀ» Á¦¾îÇÏ´Â INtime ¾îÇø®ÄÉÀÌ¼Ç ¡±USB Ŭ¶óÀÌ¾ðÆ®¡±ÀÔ´Ï´Ù.
INtimeÀÇ USB ¾ÆÅ°ÅØÃÄ´Â ÀÌ ÁßÀÇ ¡±USB Ŭ¶óÀÌ¾ðÆ®¡±¸¦
°³¹ß·½ÇÇàÇϱâ À§ÇÑ È¯°æÀ» Á¦°øÇϰí ÀÖ°Ô µË´Ï´Ù.
Step1: USB Ŭ¶óÀ̾ðÆ®
°³¹ßÀÇ ¿£Æ®¸® Æ÷ÀÎÆ®
INtime
¾îÇø®ÄÉÀ̼ÇÀ¸·Î¼ÀÇ USB Ŭ¶óÀÌ¾ðÆ® °³¹ß¿¡´Â INtimeÀÌ Á¦°øÇϰí ÀÖ´Â USB ÇÔ¼ö ÄÝÀ» »ç¿ëÇÕ´Ï´Ù. ÀÌÇÏÀÇ ÄÚµå´Â USB Ŭ¶óÀÌ¾ðÆ®·Î¼ Çʼö°¡ µÇ´Â ÃʱâÈ
ó¸®ÀÔ´Ï´Ù.
UsbConnect ÄÝ¿¡
ÀÇÇØ¼ µð¹ÙÀ̽º ¸íΰú 3°³ÀÇ Äݹé ÇÔ¼ö¸¦ USBSS¿¡ µî·ÏÇÕ´Ï´Ù. 3°³ÀÇ Äݹé ÇÔ¼ö¿Í´Â ´ÙÀ½ÀÇ °ÍÀÔ´Ï´Ù.
1. USB ±â±âÀÇ Á¢¼ÓÀÌ È®À뵃 ¶§¸¶´Ù ÄÝ¹é µÇ´Â
match(). ¿©±â¿¡¼´Â ÀεµÇØÁø USB ±â±â ID°¡
Á¦¾î ´ë»óÀ¸·Î ÇÏ´Â USB ±â±âÀÇ ID¿Í ÀÏÄ¡Çϰí ÀÖÀ»±î¸¦ ÆÇ´ÜÇϴ ó¸®¸¦
±â¼úÇÕ´Ï´Ù.
2. match¿¡ ´ëÇØ ¸ñÀûÀÇ ±â±â·Î ÆÇÁ¤ÇßÀ» °æ¿ì¿¡ Äݹé
µÇ´Â connect(). ¿©±â¿¡¼´Â USB ±â±â °í
À¯ÀÇ ÃʱâÈ Ã³¸®µîÀ» ±â¼úÇÕ´Ï´Ù.
3. Àý´Ü µÇ¾úÀ» °æ¿ì(ÇÖ Ç÷¯±× ¾Æ¿ô)¿¡ ÄÝ¹é µÇ´Â
disconnect(). ¿©±â¿¡¼´Â ÀÛ¾÷¿ë ¸Þ¸ð¸®
ÇØ¹æµîÀÇ Á¾·á½Ã 󸮸¦ ±â¼úÇÕ´Ï´Ù.
static struct usbClient my_usb_client = {
"TargetUSBdevice",
cb_my_match,
cb_my_connect,
cb_my_disconnect
};
void main(void)
{
UsbConnect( &my_usb_client );
}
Step2: ¸ñÀûÀÇ USB
±â±â¸¦ Á¦¾îÇÑ´Ù
µð¹ÙÀ̽ºÀÇ Á¢¼ÓÀÌ È®¸³Çϸé
Æã¼Ç¿¡ ´ëÇØ¼ Ä¿¸àµå·ÀÀ´äÀÇ ±³È¯ÀÌ °¡´ÉÇÕ´Ï´Ù. ÀÌ ±³È¯¿¡´Â USB ±â±âÃøÀÌ Á¤ÀÇÇϰí ÀÖ´Â º¹¼öÀÇ ³í¸®ÀûÀÎ Á¢¼Ó ´ÜÀÚ(¿£µå Æ÷ÀÎÆ®)°¡ »ç¿ëµË´Ï´Ù. USB Ŭ¶óÀÌ¾ðÆ®´Â
¿£µå Æ÷ÀÎÆ®¿¡ ´ëÇØ¼ ¼Û½ÅÀ̳ª ¼ö½ÅÀÇ ¿ä±¸ Æ÷¸Ë(URB)À» ¼Û½ÅÇØ, ±× °á°ú´Â ÁöÁ¤ÇÑ Äݹé ÇÔ¼öÀÇ È£ÃâÀÌ ÀÖ´Â °ÍÀ¸·Î ÆÇ´ÜÇÒ ¼ö ÀÖ½À´Ï´Ù.
USB ±â±âÀÇ ¿£µå Æ÷ÀÎÆ® ±¸¼ºÀ̳ª, Ä¿¸àµå·ÀÀ´ä Æ÷¸ËÀº ±ÔÁ¤ ³¡³ Ç¥ÁØ µð¹ÙÀ̽º¸¦ Á¦¿ÜÇÏ°í ¸ÞÀÌÄ¿ µ¶ÀÚÀûÀ¸·Î Á¤Àǵǰí Àֱ⠶§¹®¿¡ ÀÎÅÍÆäÀ̽º
ÀÚ·á°¡ ÇÊ¿äÇÕ´Ï´Ù.
USB ÇÔ¼öÀÇ
À϶÷
INtime˼ USB
Ŭ¶óÀÌ¾ðÆ® ÇÁ·Î±×·¥ Á¦ÀÛÀ» À§Çؼ ´ÙÀ½°ú °°Àº ÇÔ¼ö¸¦ °ø±ÞÇϰí ÀÖ½À´Ï´Ù. À̰͵éÀº Windows³ª Linuxµî¿¡¼µµ »ç¿ëµÇ´Â URB¸¦ ÀÌ¿ëÇÏ´Â ±¸Á¶ ÇüÅÂÀ̸ç, USB ±â±âÀÇ
¼ÒÇÁÆ®¿þ¾î °³¹ßÀ» °æÇè ³¡³ ºÐ¿¡°Ô ÀÖ¾î¼ ½ºÆ®·¹½º¾øÀÌ ÀÌ¿ëÇÒ ¼ö ÀÖµµ·Ï ¹è·ÁµÇ°í ÀÖ½À´Ï´Ù.
USB Ŭ¶óÀ̾ðÆ®ÀÇ Á¦¾î
ÇÔ¼ö
|
Connect a client
to the USB subsystem
|
UsbConnect
|
|
Disconnect a
client to the USB subsystem
|
UsbDisconnect
|
URB Á¦¾î¿ë ÇÔ¼ö¿Í
¸ÅÅ©·Î
|
Allocate a URB
for use by the client
|
UsbAllocUrb
|
|
Free the memory
of a URB when all users of it are finished
|
UsbFreeUrb
|
|
Submit a
transfer request to the USB subsystem
|
UsbSubmitUrb
|
|
Cancel a
transfer request for an endpoint
|
UsbUnlinkUrb
|
|
Cancel a
transfer request for an endpoint
|
UsbKillUrb
|
|
Fill an URB for
a control transfer
|
UsbFillControlUrb
|
|
Fill an URB for
a bulk transfer
|
UsbFillBulkUrb
|
|
Fill an URB for
an interrupt transfer
|
UsbFillIntUrb
|
|
Fill an URB for
an isochronous transfer
|
UsbFillIsoUrb
|
USB ¹ö½º Á¦¾î
ÇÔ¼ö
| Create a control
transfer and synchronously submit it, returning upon completion or time
out |
UsbControlMsg |
| Create a bulk
transfer and submit it synchronously, returning from the call upon completion or
time out |
UsbBulkMsg |
| Clear a halt
condition on an endpoint |
UsbClearHalt |
| Return the
descriptor of given type and index |
UsbGetDescriptor |
| Return the
device descriptor for a given handle |
UsbGetDeviceDescriptor |
| Return the
interface descriptor for a given handle |
UsbGetInterfaceDescriptor |
| Return the
endpoint descriptor for the given interface handle and endpoint
index |
UsbGetEndpointDescriptor |
| Return the
number of endpoints for a given interface |
UsbGetEndpointCount |
| Return a
configuration descriptor given a device handle |
UsbGetConfigDescriptor |
| Get the current
configuration number of a given device |
UsbGetConfiguration |
| Set a
configuration number of a given device |
UsbSetConfiguration |
| Set an
alternative setting number of a given interface |
UsbSetInterface |
| Get the device,
interface, or endpoint status |
UsbGetStatus |
| Get a string
descriptor in UTF-16 LE format |
UsbGetLanguageString |
| Get a string
descriptor in ASCII format and US/English language ID |
UsbGetAsciiString | |
HOME
| INtime
|