This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Polling Mode in Serial library

Hello,

Can anyone point me to a good example for Polling mode using serial library?

I'm looking for an application in which I can poll the serial port for data. I went through API documentation and found that Serial library has a polling mode. Can anyone guide me in using that?

Parents Reply
  • When using the POLLING mode, the function calls nrf_serial_read and nrf_serial_write will not return until the operation is complete (the number of specified bytes have been transmitted or received), the timeouts will not be functional. If you do not write anything to the UART line, it will be stuck on the read if until the requested number of bytes are received. nrf_serial_flush will not have any effect in polling mode:

    if (p_serial->p_ctx->p_config->mode == NRF_SERIAL_MODE_POLLING)
    {
        return NRF_SUCCESS;
    }

Children
No Data
Related