Buy Contact Devices Home

nsdsp_session_wait_for_data

This function waits until the specified amount of data is received from NSDSP programmer.

Syntax

int nsdsp_session_wait_for_data(
        nsdsp_session_t   session,
        int               size,
        int               forever
);

Parameters

session - a reference to the Session Object

size - the requested amount of data in bytes

forever - non-zero to wait indefinitely, or zero to use timeouts

Return

The function returns non-zero if the requested amount of data is available, or zero in case of timeout.

Notes

If the data never arrives, the function may wait forever. To stop the wait, you can abort the connection from another thread with nsdspif_abort function, using the abort id returned by nsdsp_get_abort_id. If aborted, the function returns zero and the connection becomes unusable.

 

Supported session types: UART,SPI

Minimum library version - 163

Northern Software Home NSDSP Supported Devices Contact Us Purchase/View Cart

© 2007-2026 Northern Software Inc. All Rights Reserved.