Commit 206bf85e authored by jdelange's avatar jdelange
Browse files

* po_hi_driver_linux_serial.c

   - Put the change of the serial driver in the trunk version, Yann confirmed
     this resolved his issue (see bug 186)


git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2930 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 3b033262
......@@ -59,17 +59,22 @@ void __po_hi_c_driver_serial_linux_poller (const __po_hi_device_id dev_id)
__PO_HI_DEBUG_DEBUG ("[LINUX SERIAL] Hello, i'm the serial poller , must read %d bytes!\n", __PO_HI_MESSAGES_MAX_SIZE);
__po_hi_msg_reallocate (&msg);
n = read (po_hi_c_driver_serial_fd_read, &(msg.content[0]), __PO_HI_MESSAGES_MAX_SIZE);
if (n == -1)
n = 0;
while (n < __PO_HI_MESSAGES_MAX_SIZE)
{
__PO_HI_DEBUG_DEBUG ("[LINUX SERIAL] Cannot read on socket !\n");
return;
if (read (po_hi_c_driver_serial_fd_read, &(msg.content[n]), 1) != 1)
{
__PO_HI_DEBUG_DEBUG ("[LINUX SERIAL] Cannot read on socket !\n");
return;
}
n++;
}
if (n == 0)
{
__PO_HI_DEBUG_DEBUG ("[LINUX SERIAL] n=0 !\n");
return;
}
......@@ -82,13 +87,14 @@ void __po_hi_c_driver_serial_linux_poller (const __po_hi_device_id dev_id)
__PO_HI_DEBUG_DEBUG ("[LINUX SERIAL] read() returns %d\n", n);
/*
__PO_HI_DEBUG_DEBUG ("[LINUX SERIAL] Message: 0x");
for (ts = 0 ; ts < __PO_HI_MESSAGES_MAX_SIZE ; ts++)
{
__PO_HI_DEBUG_DEBUG ("%x", msg.content[ts]);
}
*/
__PO_HI_DEBUG_DEBUG ("\n");
swap_pointer = (unsigned long*) &msg.content[0];
swap_value = *swap_pointer;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment