*
* @file sci.h
*
- * @copyright Copyright (C) 2013-2014 Czech Technical University in Prague
+ * @copyright Copyright (C) 2013-2015 Czech Technical University in Prague
*
* @author Carlos Jenkins <carlos@jenkins.co.cr>
*/
* initialized to 115200. It can be changed later by calling
* rpp_sci_setup().
*
+ * This function is not thread safe. Do not call it from multiple threads.
+ *
* @return SUCCESS if initialization successful.\n
* FAILURE if module already initialized.
*/
/**
* SCI module setup.
*
+ * The function is thread safe.
+ *
* Configure the SCI module.
*
* @param[in] baud Baud rate for the SCI. Tested values are 9600 and 115200
/**
* Number of bytes available on input buffer.
*
+ * The function is thread safe.
+ *
* Get the number of bytes (characters) available for reading from the serial
* port. This is data that's already arrived and stored in the SCI input buffer.
*
/**
* Read n number of bytes from input buffer.
*
+ * The function is thread safe.
+ *
* Transfer given amount of bytes from SCI input buffer into given buffer.
* Buffer should be at least as large as the amount of data requested.
*
/**
* Read n number of bytes from input buffer if possible.
*
+ * The function is thread safe.
+ *
* Transfer given amount of bytes from SCI input buffer into given buffer.
* Buffer should be at least as large as the amount of data requested.
*
/**
* Write n number of bytes to the output buffer.
*
+ * The function is thread safe.
+ *
* Transfer given amount of bytes from given buffer to the SCI output buffer.
* Data buffer should be at least as large as the amount of data requested to be
* sent.
/**
* Write n number of bytes to the output buffer if possible.
*
+ * The function is thread safe.
+ *
* Transfer given amount of bytes from given buffer to the SCI output buffer.
* Data buffer should be at least as large as the amount of data requested to be
* sent.
/**
* Flush incomming or outgoing buffers.
*
+ * The function is thread safe.
+ *
* This is a blocking call.
*
* This will block if another process is writing to or reading data from the
/**
* C style printk using RPP SCI module.
*
+ * The function is not thread safe.
+ *
* This call is intended to be used from interrupt only.
* Function blocks until whole string was sent to the SCI output, therefore
* it should be used with care. Frequent usage is for debugging.
/**
* C style printk using RPP SCI module.
*
+ * The function is not thread safe.
+ *
* This call is intended to be used from interrupt only.
* Function tries to append string to the output buffer.
*
/**
* C style printf using RPP SCI module.
*
+ * The function is thread safe.
+ *
* This is a blocking call.
*
* This function will wait until all the bytes are sent to the SCI output
/**
* C style vprintf using RPP SCI module.
*
+ * The function is thread safe.
+ *
* This is a blocking call.
*
* This function will wait until all the bytes are sent to the SCI output
/**
* C style putc (put character) using RPP SCI module.
*
+ * The function is not thread safe.
+ *
* This is a blocking call.
*
* This function will wait until the given byte is put into SCI output buffer if
/**
* C style getc (get character) using RPP SCI module.
*
+ * The function is not thread safe.
+ *
* This is a blocking call.
*
* This function will wait until a byte is available in the SCI input buffer if