nsdsp_session_wait_for_data
nsdsp_session_fetch_data nsdsp_session_fetch_data_nb nsdsp_session_flush nsdsp_session_send_uart nsdsp_session_send_spi nsdsp_session_receive_spi nsdsp_session_set_cke nsdsp_session_set_smp nsdsp_session_set_mclr nsdsp_session_set_hvp nsdsp_session_set_pgm nsdsp_session_set_pgcd nsdsp_session_set_red_led nsdsp_session_set_green_led nsdsp_session_short_delay nsdsp_session_delay_us nsdsp_session_delay_msnsdsp_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
© 2007-2026 Northern Software Inc. All Rights Reserved.