software/spu32-system/bios/bios.c
// function to handle stream write requests
function to handle stream write requests
function to handle stream write requests
void _bios_write_stream(struct request_readwrite_stream_t* request) {
    device_t device = request->device;
    if(device == DEVICE_STDOUT) {
        device = bios_stdout_device;
    }
    switch(device) {
        case DEVICE_VIDEO:
            bios_video_write(request);
            request->result = RESULT_OK;
            return;
        case DEVICE_UART: {
            bios_uart_write(request);
            request->result = RESULT_OK;
            return;
        }
        default: {
            request->result = RESULT_ERR;
        }
    }
}
void _bios_write_stream ( struct request_readwrite_stream_t * request ) { device_t device = request -> device ; if ( device == DEVICE_STDOUT ) { device = bios_stdout_device ; } switch ( device ) { case DEVICE_VIDEO : bios_video_write ( request ) ; request -> result = RESULT_OK ; return ; case DEVICE_UART : { bios_uart_write ( request ) ; request -> result = RESULT_OK ; return ; } default : { request -> result = RESULT_ERR ; } } }
function to handle stream write requests
function to handle stream write requests