AX10445 Module Series User
’
s Manual
Application
32
/* retrieve data from channel 1 receive buffer */
int GetlStr()
{
if (rear1 == front1) return 0;
sil = 0;
while (si1 < BUFSIZE)
{
if (rear1 != front1)
{
showbuf1[si1] = inbuf1[rear1];
si1++;
rear1++;
}
else {
/* no data in buffer now */
showbuf1[si1] = ‘\0’;
return si1;
}
}
return 0;
}
/* retrieve data from channel 2 receive buffer */
int Get2Str()
{
if (rear2 == front2) return 0;
si2 = 0;
while (si2 < BUFSIZE)
{
if (rear 2 != front2)
{
showbuf2[si2] = inbuf2[rear2];
si2++;
rear2++;
}
else {
/* no data in buffer now */
showbuf2[si2] = ‘\0’;
return si2;
}
Содержание AX10445 Series
Страница 1: ...AX10445 Series Isolated Dual Channel RS422 485 Interface Module User s Manual...
Страница 10: ...AX10445 Module Series User s Manual 4 This page does not contain any information...
Страница 20: ...AX10445 Module Series User s Manual Setting up the AX10445 14 This page does not contain any information...
Страница 41: ...AX10445 Module Series User s Manual Application 33 return 0 void Reset_Buf rear1 front1 rear2 front2 0...
Страница 46: ...AX10445 Module Series User s Manual 36 This page does not contain any information...
Страница 48: ...AX10445 Module Series User s Manual 38 This page does not contain any information...
Страница 50: ...AX10445 Module Series User s Manual 40 This page does not contain any information...
Страница 52: ...AX10445 Module Series User s Manual 42 This page does not contain any information...
Страница 54: ...AX10445 Module Series User s Manual 44 This page does not contain any information...
Страница 58: ...AX10445 Module Series User s Manual 48 This page does not contain any information...