mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 02:57:46 +00:00
machine: clarify WriteAt semantics of BlockDevice
Flash can generally only be written after it has been erased, which wasn't spelled out explicitly in the interface.
This commit is contained in:
committed by
Ron Evans
parent
c80da7eb0d
commit
5ae8fd1f6f
@@ -43,6 +43,11 @@ type BlockDevice interface {
|
||||
io.ReaderAt
|
||||
|
||||
// WriteAt writes the given number of bytes to the block device.
|
||||
//
|
||||
// This interface directly writes data to the underlying block device.
|
||||
// Different kinds of devices have different requirements: most can only
|
||||
// write data after the page has been erased, and many can only write data
|
||||
// with specific alignment (such as 4-byte alignment).
|
||||
io.WriterAt
|
||||
|
||||
// Size returns the number of bytes in this block device.
|
||||
|
||||
Reference in New Issue
Block a user