k

Dependencies:   Hm MPL MPU60580 MU2Class SDFileSystem mbed

Committer:
pyonta2017
Date:
Wed Sep 13 09:44:08 2017 +0000
Revision:
1:8a25883c423c
Parent:
0:6ddf1386e71d
aa

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pyonta2017 0:6ddf1386e71d 1 /*------------------------------------------------------------------------*/
pyonta2017 0:6ddf1386e71d 2 /* Universal string handler for user console interface (C)ChaN, 2011 */
pyonta2017 0:6ddf1386e71d 3 /*------------------------------------------------------------------------*/
pyonta2017 0:6ddf1386e71d 4
pyonta2017 0:6ddf1386e71d 5 #ifndef _STRFUNC
pyonta2017 0:6ddf1386e71d 6 #define _STRFUNC
pyonta2017 0:6ddf1386e71d 7
pyonta2017 0:6ddf1386e71d 8 #define _USE_XFUNC_OUT 1 /* 1: Use output functions */
pyonta2017 0:6ddf1386e71d 9 #define _CR_CRLF 1 /* 1: Convert \n ==> \r\n in the output char */
pyonta2017 0:6ddf1386e71d 10
pyonta2017 0:6ddf1386e71d 11 #define _USE_XFUNC_IN 1 /* 1: Use input function */
pyonta2017 0:6ddf1386e71d 12 #define _LINE_ECHO 1 /* 1: Echo back input chars in xgets function */
pyonta2017 0:6ddf1386e71d 13
pyonta2017 0:6ddf1386e71d 14
pyonta2017 0:6ddf1386e71d 15 #if _USE_XFUNC_OUT
pyonta2017 0:6ddf1386e71d 16 #define xdev_out(func) xfunc_out = (void(*)(unsigned char))(func)
pyonta2017 0:6ddf1386e71d 17 extern void (*xfunc_out)(unsigned char);
pyonta2017 0:6ddf1386e71d 18 void xputc (char c);
pyonta2017 0:6ddf1386e71d 19 void xputs (const char* str);
pyonta2017 0:6ddf1386e71d 20 void xfputs (void (*func)(unsigned char), const char* str);
pyonta2017 0:6ddf1386e71d 21 void xprintf (const char* fmt, ...);
pyonta2017 0:6ddf1386e71d 22 void xsprintf (char* buff, const char* fmt, ...);
pyonta2017 0:6ddf1386e71d 23 void xfprintf (void (*func)(unsigned char), const char* fmt, ...);
pyonta2017 0:6ddf1386e71d 24 void put_dump (const void* buff, unsigned long addr, int len, int width);
pyonta2017 0:6ddf1386e71d 25 #define DW_CHAR sizeof(char)
pyonta2017 0:6ddf1386e71d 26 #define DW_SHORT sizeof(short)
pyonta2017 0:6ddf1386e71d 27 #define DW_LONG sizeof(long)
pyonta2017 0:6ddf1386e71d 28 #endif
pyonta2017 0:6ddf1386e71d 29
pyonta2017 0:6ddf1386e71d 30 #if _USE_XFUNC_IN
pyonta2017 0:6ddf1386e71d 31 #define xdev_in(func) xfunc_in = (unsigned char(*)(void))(func)
pyonta2017 0:6ddf1386e71d 32 extern unsigned char (*xfunc_in)(void);
pyonta2017 0:6ddf1386e71d 33 int xgets (char* buff, int len);
pyonta2017 0:6ddf1386e71d 34 int xfgets (unsigned char (*func)(void), char* buff, int len);
pyonta2017 0:6ddf1386e71d 35 int xatoi (char** str, long* res);
pyonta2017 0:6ddf1386e71d 36 #endif
pyonta2017 0:6ddf1386e71d 37
pyonta2017 0:6ddf1386e71d 38 #endif
pyonta2017 0:6ddf1386e71d 39