embedded system library for e-puck  1.0.1
A redesigned API library for the e-puck robot platform
 All Data Structures Files Functions Variables Enumerations Enumerator Modules Pages
elu_stdio.h
Go to the documentation of this file.
1 /*
2 
3 embedded system library for e-puck
4 
5 --------------------------------------------------------------------------------
6 
7 code distribution:
8 https://github.com/jianingchen/epucklib
9 
10 online documentation:
11 http://jianingchen.github.io/epucklib/html/
12 
13 --------------------------------------------------------------------------------
14 
15 This file is released under the terms of the MIT license (see "el.h").
16 
17 */
18 
55 #ifndef ELU_STDIO_H
56 #define ELU_STDIO_H
57 
58 #include "el_common.h"
59 #include "el_uart.h"
60 
61 #define _SNPRINTF_FAMILY __attribute__ ((format(printf,3,4)))
62 #define _SSCANF_FAMILY __attribute__ ((format(scanf,2,3)))
63 
64 #define _PRINTF_FAMILY __attribute__ ((format(printf,1,2)))
65 #define _SCANF_FAMILY __attribute__ ((format(scanf,1,2)))
66 
67 
74 int elu_snprintf(char*s,unsigned int n,const char*format,...) _SNPRINTF_FAMILY;
75 
76 
83 int elu_sscanf(const char*s,const char*format,...) _SSCANF_FAMILY;
84 
85 
94 int elu_printf(const char*format,...) _PRINTF_FAMILY;
95 
96 
105 int elu_println(const char*format,...) _PRINTF_FAMILY;
106 
107 
119 int elu_scanf(const char*format,...) _SCANF_FAMILY;
120 
121 
127 void elu_scanf_set_echo(bool k);
128 
129 
130 int elu_putchar(int c);
131 
132 
133 #ifdef EL_INCLUDE_LIB_INTERNAL_CONTEXT
134 
135 #define ELU_STDIO_BUFFER_SIZE 80
136 extern char elu_stdio_buffer[ELU_STDIO_BUFFER_SIZE];
137 
138 #endif
139 
140 #endif /* ELU_STDIO_H */
int elu_printf(const char *format,...) _PRINTF_FAMILY
send a string with data fields to UART1
void elu_scanf_set_echo(bool k)
configure whether elu_scanf echo the character received
int elu_sscanf(const char *s, const char *format,...) _SSCANF_FAMILY
sscanf to be used here
int elu_snprintf(char *s, unsigned int n, const char *format,...) _SNPRINTF_FAMILY
snprintf to be used here
int elu_println(const char *format,...) _PRINTF_FAMILY
send a string with data fields + a newline char to UART1
int elu_scanf(const char *format,...) _SCANF_FAMILY
scanf to be used here