mspgcc: A port of the GNU tools to the Texas Instruments MSP430 microcontrollers | ||
---|---|---|
<<< Previous | MSP430 specific extensions to the GNU toolchain | Next >>> |
The MSP430 version of libc contains a subset of the standard C library functions. These are:
The full definition of these functions can be found in any C manual, including the on line documentation for the GNU tools. They will not be detailed here.abs() bsearch() exit() malloc()
rand() strtoul() abort() atoi()
labs() setjmp() abort() atol()
errno() ldiv() qsort() strtol()
ffs() memcpy() strcat() strdup()
strncmp() strspn() atol() memmove()
strchr() strlcat() strncpy() strstr()
bcmp() memccpy() memset() strcmp()
strlcpy() strpbrk() strtok() bcopy()
memchr() rindex() strcpy() strlen()
strrchr() swab() bzero() memcmp()
strcasecmp() strcspn() strncat() strsep()
snprintf() sprintf()
Take care with format conversions in sprintf():
%d, %x, etc. convert 16 bit variables
%lx, %ld, etc. convert 32 bit long variables.
is similar to "sprintf()", except that caller provides an output function for printing, rather than an output buffer. This function must accept a single "char" parameter, and return "void" (for example to send a character to a UART). The user function is responsible for mutexes, slow interfaces, etc. "uprintf()" will not return until all characters have been printed.uprintf(void (*func)(char c), const char *fmt,...);
<<< Previous | Home | Next >>> |
Handling the status register | Up | Starting from reset |