|
| 1 | +@defgroup sys_shell_commands_mtd MTD shell command |
| 2 | +@ingroup sys_shell_commands |
| 3 | +@brief MTD shell command for low level storage device access |
| 4 | + |
| 5 | +Available MTD Subcommands |
| 6 | +========================== |
| 7 | + |
| 8 | +There are different subcommands available to read and write data to and from an MTD, |
| 9 | +as well as additional subcommands for example to print information or to control |
| 10 | +power states. |
| 11 | + |
| 12 | +Subcommand: read \<addr\> \<len\> |
| 13 | +----------------------------- |
| 14 | + |
| 15 | +The subcommand takes a memory address and a length in bytes of how many bytes to read. |
| 16 | +@see mtd_read |
| 17 | + |
| 18 | +Subcommand: read_page \<page\> \<offset\> \<len\> |
| 19 | +------------------------------------------- |
| 20 | + |
| 21 | +The subcommand takes a page number, an offset within that page and a length in bytes |
| 22 | +of how many bytes to read. |
| 23 | +@see mtd_read_page |
| 24 | + |
| 25 | +Subcommand: write [-b] \<addr\> \<data\> |
| 26 | +------------------------------------ |
| 27 | + |
| 28 | +The subcommand takes a memory address and data to write. |
| 29 | +If the optional parameter `-b` is used, it is expected that the provided data only |
| 30 | +consists of hexadecimal digits, else it is expected that the data is a string. |
| 31 | +@see mtd_write |
| 32 | + |
| 33 | +Subcommand: write_page_raw [-b] \<page\> \<offset\> \<data\> |
| 34 | +------------------------------------------------------ |
| 35 | + |
| 36 | +The subcommand takes a page number, a byte offset within the page and data to write. |
| 37 | +If the optional parameter `-b` is used, it is expected that the provided data only |
| 38 | +consists of hexadecimal digits, else it is expected that the data is a string. |
| 39 | +@see mtd_write_page_raw |
| 40 | + |
| 41 | +Subcommand: write_page [-b] \<page\> \<offset\> \<data\> |
| 42 | +-------------------------------------------------- |
| 43 | + |
| 44 | +The subcommand takes a page number, a byte offset within the page and data to write. |
| 45 | +If the optional parameter `-b` is used, it is expected that the provided data only |
| 46 | +consists of hexadecimal digits, else it is expected that the data is a string. |
| 47 | +The command only can be used when the module `mtd_write_page` is used. |
| 48 | +@see mtd_write_page |
| 49 | + |
| 50 | +Subcommand: erase \<addr\> \<len\> |
| 51 | +------------------------------ |
| 52 | + |
| 53 | +The subcommand takes a memory address and a length in bytes of how many bytes to erase. |
| 54 | +@see mtd_erase |
| 55 | + |
| 56 | +Subcommand: erase \<sector\> [count] |
| 57 | +---------------------------------- |
| 58 | + |
| 59 | +The subcommand takes a sector number and additionally a number of bytes to erase from this sector. |
| 60 | +@see mtd_erase_sector |
| 61 | + |
| 62 | +Subcommand: info |
| 63 | +---------------- |
| 64 | + |
| 65 | +The subcommand takes no additional arguments. |
| 66 | +Information about storage size is printed. |
| 67 | + |
| 68 | + |
| 69 | +Subcommand: power \<on|off\> |
| 70 | +-------------------------- |
| 71 | + |
| 72 | +The subcommand takes one parameter to power the MTD on or off, if it is implemented by the MTD driver. |
| 73 | +@see mtd_power |
0 commit comments