SLIP ÇÁ·ÎÅäÄÝÀº ½Ã¸®¾ó ¶óÀÎÀ» ÅëÇØ IP ÆÐŶÀ» Àü¼ÛÇÏ´Â °¡Àå °£´ÜÇÑ ¹æ¹ýÀÌ´Ù. À̰ÍÀº ¾î¶°ÇÑ µ¥ÀÌÅÍ Àý´ÜÀ̳ª ¿¡·¯Á¦¾î¸¦ Á¦°øÇÏÁö ¾Ê´Â´Ù. µû¶ó¼ ¿À´Ã³¯ ³Î¸® »ç¿ëµÇÁö´Â ¾Ê´Â´Ù.
This SLIP implementation requires two functions for accessing the serial device: slipdev_char_poll() and slipdev_char_put(). These must be implemented specifically for the system on which the SLIP protocol is to be run.
ÀÌ SLIP ±¸ÇöÀº ½Ã¸®¾ó µð¹ÙÀ̽º¸¦ Á¢±ÙÇϱâ À§ÇØ µÎ °¡Áö ±â´ÉÀ» ¿ä±¸ÇÑ´Ù. slipdev_char_poll()°ú slipdev_char_put(). À̵é ÇÔ¼ö´Â SLIP ÇÁ·ÎÅäÄÝÀÌ ½ÇÇàµÇ´Â ½Ã½ºÅÛ¿¡¼ ±¸ÇöµÇ¾î¾ß ÇÑ´Ù.
Files | |
file | slipdev.c |
SLIP protocol implementation. SLIP ÇÁ·ÎÅäÄÝÀÌ ±¸Çö. | |
file | slipdev.h |
SLIP header file. SLIP Çì´õ ÆÄÀÏ. | |
Functions | |
void | slipdev_char_put (u8_t c) |
Put a character on the serial device. ¹®ÀÚ¸¦ ½Ã¸®¾ó µð¹ÙÀ̽º¿¡ ³Ö´Â´Ù. | |
u8_t | slipdev_char_poll (u8_t *c) |
Poll the serial device for a character. ½Ã¸®¾ó µð¹ÙÀ̽º¿¡¼ ¹®ÀÚ¸¦ Æú¸µ. | |
void | slipdev_init (void) |
Initialize the SLIP module. SLIP ¸ðµâ ÃʱâÈ. | |
void | slipdev_send (void) |
Send the packet in the uip_buf and uip_appdata buffers using the SLIP protocol. SLIP ÇÁ·ÎÅäÄÝÀ» ÀÌ¿ëÇØ¼ uip_buf¿Í uip_appdata ¹öÆÛ¿¡ ÀÖ´Â ÆÐŶÀ» ¼Û½Å. | |
u16_t | slipdev_poll (void) |
Poll the SLIP device for an available packet. SLIP µð¹ÙÀ̽º¿¡¼ À¯È¿ÇÑ ÆÐŶÀ» Æú¸µ. |
|
Poll the serial device for a character. ½Ã¸®¾ó µð¹ÙÀ̽º¿¡¼ ¹®ÀÚ¸¦ Æú¸µ.
ÀÌ ÇÔ¼ö´Â ½Ã¸®¾ó µð¹ÙÀ̽º¿¡¼ ¹®ÀÚ¸¦ Æú¸µÇϱâ À§ÇØ SLIP¿¡ ÀÇÇØ »ç¿ëµÈ´Ù. ÀÌ ÇÔ¼ö´Â SLIP ÇÁ·ÎÅäÄÝÀÌ ½ÇÇàµÇ´Â ½Ã½ºÅÛ¿¡¼ ±¸ÇöµÇ¾î¾ß ÇÑ´Ù.
ÀÌÇÔ¼ö´Â ¹®ÀÚ°¡ À¯È¿ÇÏµç ¾ÈÇϵç Áï½Ã ¸®ÅÏÇØ¾ß ÇÑ´Ù. ¹®ÀÚ°¡ À¯È¿Çϸé ÀÎÀÚ c¿¡ÀÇÇØ Áö¿øµÇ´Â Æ÷ÀÎÅͰ¡ °¡¸®Å°´Â ¸Þ¸ð¸® ¿µ¿ª¿¡ ÀúÀåµÇ¾î¾ß ÇÑ´Ù.
|
|
Put a character on the serial device. ¹®ÀÚ¸¦ ½Ã¸®¾ó µð¹ÙÀ̽º¿¡ ³Ö´Â´Ù.
ÀÌÇÔ¼ö´Â ¹®ÀÚ¸¦ ½Ã¸®¾ó µð¹ÙÀ̽º¿¡ ³Ö±â À§ÇØ SLIP¿¡ ÀÇÇØ »ç¿ëµÈ´Ù. ÀÌ ÇÔ¼ö´Â SLIP ÇÁ·ÎÅäÄÝÀÌ ½ÇÇàµÇ´Â ½Ã½ºÅÛ¿¡¼ ±¸ÇöµÇ¾î¾ß ÇÑ´Ù.
|
|
Initialize the SLIP module. SLIP ¸ðµâ ÃʱâÈ.
ÀÌ ÇÔ¼ö´Â RS232 µð¹ÙÀ̽º°¡ ¾Æ´Ñ SLIP ºÎºÐÀ» ÃʱâÈÇÑ´Ù. |
|
Poll the SLIP device for an available packet. SLIP µð¹ÙÀ̽º¿¡¼ À¯È¿ÇÑ ÆÐŶÀ» Æú¸µ.
ÀÌ ÇÔ¼ö´Â ÆÐŶÀÌ À¯È¿ÇÑÁö¸¦ °Ë»çÇϱâ À§ÇØ SLIP µð¹ÙÀ̽º¸¦ Æú¸µÇÑ´Ù. ÀÌ ÇÔ¼ö´Â RS232 ÀÎÅÍÆäÀ̽º·ÎºÎÅÍ À¯È¿ÇÑ ¸ðµç ¹ÙÀÌÆ®°¡ ÀÐÇôÁú ¹öÆÛ¸¦ »ç¿ëÇÑ´Ù. ¹öÆÛ¿¡¼ Ç® ÆÐŶÀÌ ÀÐÇôÁö¸é ÆÐŶÀº uip_buf ¹öÆÛ·Î º¹»çµÇ°í ÆÐŶ ±æÀ̰¡ ¸®ÅϵȴÙ.
|
Here is the call graph for this function:
´ÙÀ½Àº ÀÌÇÔ¼ö¿¡ ´ëÇÑ Äݱ׷¡ÇÁÀÌ´Ù.
|
Send the packet in the uip_buf and uip_appdata buffers using the SLIP protocol. SLIP ÇÁ·ÎÅäÄÝÀ» ÀÌ¿ëÇØ¼ uip_buf¿Í uip_appdata ¹öÆÛ¿¡ ÀÖ´Â ÆÐŶÀ» ¼Û½Å.
ÆÐŶÀÇ Ã¹ 40¹ÙÀÌÆ®(IP & TCP Çì´õ)´Â uip_buf ¹öÆÛ¿¡¼ ÀÐÇôÁö°í ´ÙÀ½ ¹ÙÀÌÆ®(¾îÇø®ÄÉÀÌ¼Ç µ¥ÀÌÅÍ)´Â uip_appdata¹öÆÛ¿¡¼ ÀÐÇôÁø´Ù. |
Here is the call graph for this function:
´ÙÀ½Àº ÀÌÇÔ¼ö¿¡ ´ëÇÑ Äݱ׷¡ÇÁÀÌ´Ù.