GlobLib
HAL and API libraries for MCUs and hardware.
string11.h File Reference

Header file for C11 string library. More...

#include <stdio.h>

Go to the source code of this file.

Macros

#define print(X)
 Print a given datatype to the output stream.
 
#define prints(X)
 Print a given datatype + 'space' to the output stream.
 
#define printc(X)
 Print a given datatype + 'comma' to the output stream.
 
#define printl(X)
 Print a given datatype + 'newline' to the output stream.
 
#define printt(X)
 Print a given datatype + 'tab' to the output stream.
 
#define MAX_DEC   4
 Maximum number of decimal places a float will contain.
 

Typedefs

typedef void(* v_fp_u8) (uint8_t)
 Function pointer typedef for void function with uint8_t parameter.
 

Functions

int32_t str2int (char *buffer)
 Convert a null terminated string to an integer. More...
 
uint32_t str2uint (char *buffer)
 Convert a null terminated string to an unsigned integer. More...
 
float str2float (char *buffer)
 Convert a null terminated string to a float. More...
 
void STRING11_setOutput (void(*out)(uint8_t))
 Set the target output stream for print functions. More...
 
v_fp_u8 STRING11_getOutput (void)
 Get the current target output stream. More...
 
void print_c (char x)
 Send a character to the output stream. Implemented internally. More...
 
void print_u8 (uint8_t x)
 Send a unsigned byte to the output stream. Implemented internally. More...
 
void print_8 (int8_t x)
 Send a signed byte to the output stream. Implemented internally. More...
 
void print_u16 (uint16_t x)
 Send a unsigned short to the output stream. Implemented internally. More...
 
void print_16 (int16_t x)
 Send a signed short to the output stream. Implemented internally. More...
 
void print_u32 (uint32_t x)
 Send a unsigned integer to the output stream. Implemented internally. More...
 
void print_32 (int32_t x)
 Send a signed integer to the output stream. Implemented internally. More...
 
void print_f (float x)
 Send a float to the output stream. Implemented internally. More...
 
void print_s (char *x)
 Send a string literal to the output stream. Implemented internally. More...
 
void prints_c (char x)
 Send a character plus a space to the output stream. Implemented internally. More...
 
void prints_u8 (uint8_t x)
 Send a unsigned byte plus a space to the output stream. Implemented internally. More...
 
void prints_8 (int8_t x)
 Send a signed byte plus a space to the output stream. Implemented internally. More...
 
void prints_u16 (uint16_t x)
 Send a unsigned short plus a space to the output stream. Implemented internally. More...
 
void prints_16 (int16_t x)
 Send a signed short plus a space to the output stream. Implemented internally. More...
 
void prints_u32 (uint32_t x)
 Send a unsigned integer plus a space to the output stream. Implemented internally. More...
 
void prints_32 (int32_t x)
 Send a signed integer plus a space to the output stream. Implemented internally. More...
 
void prints_f (float x)
 Send a float plus a space to the output stream. Implemented internally. More...
 
void prints_s (char *x)
 Send a string literal plus a space to the output stream. Implemented internally. More...
 
void printt_c (char x)
 Send a character plus a tab to the output stream. Implemented internally. More...
 
void printt_u8 (uint8_t x)
 Send a unsigned byte plus a tab to the output stream. Implemented internally. More...
 
void printt_8 (int8_t x)
 Send a signed byte plus a tab to the output stream. Implemented internally. More...
 
void printt_u16 (uint16_t x)
 Send a unsigned short plus a tab to the output stream. Implemented internally. More...
 
void printt_16 (int16_t x)
 Send a signed short plus a tab to the output stream. Implemented internally. More...
 
void printt_u32 (uint32_t x)
 Send a unsigned integer plus a tab to the output stream. Implemented internally. More...
 
void printt_32 (int32_t x)
 Send a signed integer plus a tab to the output stream. Implemented internally. More...
 
void printt_f (float x)
 Send a float plus a tab to the output stream. Implemented internally. More...
 
void printt_s (char *x)
 Send a string literal plus a tab to the output stream. Implemented internally. More...
 
void printc_c (char x)
 Send a character plus a comma to the output stream. Implemented internally. More...
 
void printc_u8 (uint8_t x)
 Send a unsigned byte plus a comma to the output stream. Implemented internally. More...
 
void printc_8 (int8_t x)
 Send a signed byte plus a comma to the output stream. Implemented internally. More...
 
void printc_u16 (uint16_t x)
 Send a unsigned short plus a comma to the output stream. Implemented internally. More...
 
void printc_16 (int16_t x)
 Send a signed short plus a comma to the output stream. Implemented internally. More...
 
void printc_u32 (uint32_t x)
 Send a unsigned integer plus a comma to the output stream. Implemented internally. More...
 
void printc_32 (int32_t x)
 Send a signed integer plus a comma to the output stream. Implemented internally. More...
 
void printc_f (float x)
 Send a float plus a comma to the output stream. Implemented internally. More...
 
void printc_s (char *x)
 Send a string literal plus a comma to the output stream. Implemented internally. More...
 
void printl_c (char x)
 Send a character plus a new line to the output stream. Implemented internally. More...
 
void printl_u8 (uint8_t x)
 Send a unsigned byte plus a new line to the output stream. Implemented internally. More...
 
void printl_8 (int8_t x)
 Send a signed byte plus a new line to the output stream. Implemented internally. More...
 
void printl_u16 (uint16_t x)
 Send a unsigned short plus a new line to the output stream. Implemented internally. More...
 
void printl_16 (int16_t x)
 Send a signed short plus a new line to the output stream. Implemented internally. More...
 
void printl_u32 (uint32_t x)
 Send a unsigned integer plus a new line to the output stream. Implemented internally. More...
 
void printl_32 (int32_t x)
 Send a signed integer plus a new line to the output stream. Implemented internally. More...
 
void printl_f (float x)
 Send a float plus a new line to the output stream. Implemented internally. More...
 
void printl_s (char *x)
 Send a string literal plus a new line to the output stream. Implemented internally. More...
 

Detailed Description

Header file for C11 string library.

Definition in file string11.h.