um_write()


Writing data to designated UM(volatile memory)

Description

int um_write(int $um_id, int $offset, int/string $wbuf [, int $wlen = MAX_STRING_LEN])

Parameters

Return Value

On success, number of bytes to have been written. On fail, 0

Example

<?php
include "/lib/sd_340.php";
$wbuf = "abcde";
$rbuf = "";
um_write(0, 0, $wbuf, 5); // Writing 5 bytes of data to the address 0 of the UM0
um_read(0, 0, $rbuf, 5);  // Reading 5 bytes of data from the address 0 of the UM0
hexdump($rbuf);           // Outputting the data
?>

See also