com_ext.h
Go to the documentation of this file.
1/**
2 * \addtogroup COM_EXT Extended Serial Communication
3 *
4 * \brief Special operations for serial communication with SPiCboards
5 *
6 * \sa com_ext.h
7 *
8 * @{
9 * \file com_ext.h
10 * \version \$Rev: 15477 $
11 */
12
13#ifndef COM_EXT_H
14#define COM_EXT_H
15
16/**
17 * \brief Set the baud rate (transmission frequence)
18 *
19 * The baud rate is the number of symbols to be transfered within one second.
20 * Hence this defines the transmission interval for a single symbol:
21 * \f$ T = \frac{1s}{BAUD\_RATE} \f$
22 *
23 * \warning In case your connection is instable you should propably
24 * consider a lower frequency!
25 *
26 * \param baud the desired baud rate
27 *
28 * \retval 4 using CPU frequency/1024 for timer
29 * \retval 3 using CPU frequency/256 for timer
30 * \retval 2 using CPU frequency/64 for timer
31 * \retval 1 using CPU frequency/8 for timer
32 * \retval 0 using CPU frequency for timer
33 * \retval -1 baud rate too high
34 * \retval -2 baud rate too low
35 * \retval -3 setting baud rate not supported (default BAUD_RATE is used)
36 */
37int8_t sb_com_setBaud(uint32_t baud);
38
39
40/**
41 * \brief Check if there is a new byte item in the receive buffer
42 *
43 * This method provides information if the next item has been received and
44 *
45 * In other words, a positive answer ensures that a call to
46 * sb_com_receiveByte() would return within the usual processing time
47 * (without the need to wait for the other communication end point to begin transmission).
48 *
49 * \retval 1 there is one item to receive
50 * \retval 0 currently no item to receive, would have to wait
51 */
53
54/** @}*/
55
56#endif
int8_t sb_com_setBaud(uint32_t baud)
Set the baud rate (transmission frequence)
uint8_t sb_com_hasReceivedItem()
Check if there is a new byte item in the receive buffer.