Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

WS

Description

This command can be used to bypass the file system and write directly to a sector on the SD card or USB stick. The disk does not need to be formatted. WS can also be used to implement custom file systems.

Parameters

This command must be invoked with a single argument that is the sector number to write, followed by a CR/LF. After that,  512 bytes of arbitrary content must be sent. The command interface is blocked until those 512 bytes are completely received. Then, data is written to the specified sector and the command interface is available again.

Return Values

ERR_OK (0) if data is successfully written to the card.
ERR_FR_NOT_READY (13) if write operation failed.

Example

WS 1000
aaaaaaa.... 

512 bytes of 'a' in total, this fills sector 1000 with the character 'a'

Remarks

Be carful when writing with this command to formatted disks. It can damage or completely destroy the filesystem.