Mistake on this page?
Report an issue in GitHub or email us
Functions
Network interface and other utility functions

Functions

void mbed_mac_address (char *mac)
 This returns a unique 6-byte MAC address, based on the interface UID If the interface is not present, it returns a default fixed MAC address (00:02:F7:F0:00:00) More...
 
MBED_NORETURN void mbed_die (void)
 Cause the mbed to flash the BLOD (Blue LEDs Of Death) sequence. More...
 
void mbed_error_printf (const char *format,...) MBED_PRINTF(1
 Print out an error message. More...
 
void void mbed_error_vprintf (const char *format, va_list arg) MBED_PRINTF(1
 Print out an error message. More...
 
void void void mbed_error_puts (const char *str)
 Print out an error message. More...
 

Detailed Description

Function Documentation

MBED_NORETURN void mbed_die ( void  )

Cause the mbed to flash the BLOD (Blue LEDs Of Death) sequence.

void mbed_error_printf ( const char *  format,
  ... 
)

Print out an error message.

This is typically called when handling a crash.

Note
Synchronization level: Interrupt safe, as long as the FileHandle::write of the stderr device is. See mbed_error_puts for more information.
This uses an internal 128-byte buffer to format the string, so the output may be truncated. If you need to write a potentially long string, use mbed_error_puts.
Parameters
formatC string that contains data stream to be printed. Code snippets below show valid format.
1 mbed_error_printf("Failed: %s, file: %s, line %d \n", expr, file, line);
void void void mbed_error_puts ( const char *  str)

Print out an error message.

This is typically called when handling a crash.

Unlike mbed_error_printf, there is no limit to the maximum output length. Unlike standard puts, but like standard fputs, this does not append a '
' character.

Note
Synchronization level: Interrupt safe, as long as the FileHandle::write of the stderr device is. The default serial console is safe, either buffered or not. If the console has not previously been initialized, an attempt to use this from interrupt may crash during console initialization. Special handling of mbed_error relaxes various system traps to increase the chance of initialization working.
Parameters
strC string that contains data stream to be printed.
void void mbed_error_vprintf ( const char *  format,
va_list  arg 
)

Print out an error message.

Similar to mbed_error_printf but uses a va_list.

Note
Synchronization level: Interrupt safe, as long as the FileHandle::write of the stderr device is. See mbed_error_puts for more information.
Parameters
formatC string that contains data stream to be printed.
argVariable arguments list
void mbed_mac_address ( char *  mac)

This returns a unique 6-byte MAC address, based on the interface UID If the interface is not present, it returns a default fixed MAC address (00:02:F7:F0:00:00)

This is a weak function that can be overwritten if you want to provide your own mechanism to provide a MAC address.

Parameters
macA 6-byte array to write the MAC address
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.