|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
读写对齐布尔位图块的工具 Helpers for reading and writing aligned boolean flag blocks. More...
#include <layout.hpp>
Static Public Member Functions | |
| static void | SetFlag (BlockBoolData< BlockSize > &obj, bool value) |
| 把一个布尔值编码进位图块 / Encode one boolean value into a flag block. | |
| static bool | ReadFlag (const BlockBoolData< BlockSize > &obj) |
| 从位图块读取布尔值 / Decode one boolean value from a flag block. | |
| static bool | Valid (const BlockBoolData< BlockSize > &obj) |
| 检查位图块内容是否仍是合法编码 / Check whether a flag block still contains a valid encoding. | |
读写对齐布尔位图块的工具 Helpers for reading and writing aligned boolean flag blocks.
| BlockSize | 位图块字节数 / Flag-block size in bytes. |
Definition at line 35 of file layout.hpp.
|
inlinestatic |
从位图块读取布尔值 / Decode one boolean value from a flag block.
| obj | 待读取位图块 / Flag block to inspect. |
true(擦除态)写成 false,且只写一次;只要有一位已被编程, 就说明这次写入已经开始,因此只有整块都是 0xFF 才读作 true。被掉电打断的 写入读作它要写成的 false。 A flag is written at most once, from true (erased) to false; any programmed bit means that write has started, so only a fully erased block reads as true, and a write cut by a power loss reads as the false it was writing. Definition at line 64 of file layout.hpp.
|
inlinestatic |
把一个布尔值编码进位图块 / Encode one boolean value into a flag block.
| obj | 目标位图块 / Target flag block. |
| value | 待编码布尔值 / Boolean value to encode. |
Definition at line 43 of file layout.hpp.
|
inlinestatic |
检查位图块内容是否仍是合法编码 / Check whether a flag block still contains a valid encoding.
| obj | 待检查位图块 / Flag block to validate. |
true / Returns true when the encoding is valid. Definition at line 82 of file layout.hpp.