serial_c_iface.h
Go to the documentation of this file.
1 /******************************************************************************/
37 /******************************************************************************/
38 
39 #if !defined(SERIAL_C_IFACE_H_)
40 #define SERIAL_C_IFACE_H_
41 
42 #include <Arduino.h>
43 
44 #if defined(__cplusplus)
45 extern "C" {
46 #endif
47 
54 #define ION_USE_INLINEPRINTF 0
55 
68 int
70  const char *format,
71  ...
72 );
73 
74 /* DO NOT CHANGE INCLUSION ORDER. */
75 #if USE_INLINE_PRINTF == 1
76 #include "printf_redirect.h"
77 #else
78 #define printf(format, ...) serial_printf_c(format, ## __VA_ARGS__)
79 #endif
80 
87 extern int
89  const char *buffer
90 );
91 
98 void
100  int baud_rate
101 );
102 
107 void
109 );
110 
111 #if defined(__cplusplus)
112 }
113 #endif
114 #endif /* SERIAL_C_IFACE_H_ */
Redirects printf statement for Arduino.
void serial_close()
Closes the communication port so that the pins can be used as general I/O.
int serial_printf_c(const char *format,...)
A version of printf that limits the number of characters printed per call.
int serial_print(const char *buffer)
A print function wrapping Arduino&#39;s serial stream.
void serial_init(int baud_rate)
Initializes serial port 0 for communications.