Writing data to the designated NM(Non-volatile Memory)
int nm_write(int $nm_id, int $offset, int/string $wbuf [, int $wlen = MAX_STRING_LEN])
On success, number of bytes to have been written. On fail, 0
<?php
include "/lib/sd_340.php";
$wbuf = "abcde";
$rbuf = "";
nm_write(0, 0, $wbuf, 5); // Writing 5 bytes of data to the address 0 of the NM0
nm_read(0, 0, $rbuf, 5); // Reading 5 bytes of data from the address 0 of the NM0
hexdump($rbuf); // Outputting the data
?>