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
Macros | Functions
elu_stdio.h File Reference
#include "el_common.h"
#include "el_uart.h"

Go to the source code of this file.

Macros

#define _SNPRINTF_FAMILY   __attribute__ ((format(printf,3,4)))
 
#define _SSCANF_FAMILY   __attribute__ ((format(scanf,2,3)))
 
#define _PRINTF_FAMILY   __attribute__ ((format(printf,1,2)))
 
#define _SCANF_FAMILY   __attribute__ ((format(scanf,1,2)))
 

Functions

int elu_snprintf (char *s, unsigned int n, const char *format,...) _SNPRINTF_FAMILY
 snprintf to be used here More...
 
int elu_sscanf (const char *s, const char *format,...) _SSCANF_FAMILY
 sscanf to be used here More...
 
int elu_printf (const char *format,...) _PRINTF_FAMILY
 send a string with data fields to UART1 More...
 
int elu_println (const char *format,...) _PRINTF_FAMILY
 send a string with data fields + a newline char to UART1 More...
 
int elu_scanf (const char *format,...) _SCANF_FAMILY
 scanf to be used here More...
 
void elu_scanf_set_echo (bool k)
 configure whether elu_scanf echo the character received More...
 
int elu_putchar (int c)
 

Detailed Description

Author
Jianing Chen

Function Documentation

int elu_snprintf ( char *  s,
unsigned int  n,
const char *  format,
  ... 
)

snprintf to be used here

Returns
length of the string
int elu_sscanf ( const char *  s,
const char *  format,
  ... 
)

sscanf to be used here

Returns
number of data field successfuly scanned
int elu_printf ( const char *  format,
  ... 
)

send a string with data fields to UART1

Parameters
formatsame rule as the format string of "printf"
Returns
length of the string with data formatted
int elu_println ( const char *  format,
  ... 
)

send a string with data fields + a newline char to UART1

Parameters
formatsame rule as the format string of "printf"
Returns
length of the string with data formatted
int elu_scanf ( const char *  format,
  ... 
)

scanf to be used here

Parameters
formatsame rule as the format string of "scanf"
Returns
number of data field successfuly scanned

This function behaves similarly to the "scanf": it receives and stores characters. When a carriage return (the Enter key) occurs, this function analyzes the string and returns.

void elu_scanf_set_echo ( bool  k)

configure whether elu_scanf echo the character received

Parameters
kecho or not