/* Set systemwide default IO stream Stream write implementation  */
sl_status_t sl_iostream_write(sl_iostream_t *stream, const void *buffer, size_t buffer_length)
/* Set systemwide default IO stream Stream write implementation  */
sl_status_t sl_iostream_write(sl_iostream_t *stream, const void *buffer, size_t buffer_length)
{
  if (stream == SL_IOSTREAM_STDOUT) {
    stream = sl_iostream_get_default();
  }
  if ((stream != NULL) && (stream->write != NULL)) {
    return stream->write(stream->context, buffer, buffer_length);
  } else {
    return SL_STATUS_INVALID_CONFIGURATION;
  }
}