diff options
Diffstat (limited to 'doc/usage')
-rw-r--r-- | doc/usage/cmd/gpio.rst | 42 | ||||
-rw-r--r-- | doc/usage/cmd/tftpput.rst | 87 | ||||
-rw-r--r-- | doc/usage/index.rst | 1 |
3 files changed, 130 insertions, 0 deletions
diff --git a/doc/usage/cmd/gpio.rst b/doc/usage/cmd/gpio.rst index f6a5668388c..ee902138f16 100644 --- a/doc/usage/cmd/gpio.rst +++ b/doc/usage/cmd/gpio.rst @@ -45,6 +45,31 @@ gpio status Display the status of one or multiple GPIOs. By default only claimed GPIOs are displayed. +gpio status command output fields are:: + + <name>: <function>: <value> [x] <label> + +*function* can take the following values: + +output + pin configured in gpio output, *value* indicates the pin's level + +input + pin configured in gpio input, *value* indicates the pin's level + +func + pin configured in alternate function, followed by *label* + which shows pinmuxing label. + +unused + pin not configured + +*[x]* or *[ ]* indicate respectively if the gpio is used or not. + +*label* shows the gpio label. + +Parameters +---------- -a Display GPIOs irrespective of being claimed. @@ -77,6 +102,23 @@ Switch the status of a GPIO:: => echo $myvar 0 +Show the GPIO status:: + + => gpio status + Bank GPIOA: + GPIOA1: func rgmii-0 + GPIOA2: func rgmii-0 + GPIOA7: func rgmii-0 + GPIOA10: output: 0 [x] hdmi-transmitter@39.reset-gpios + GPIOA13: output: 1 [x] red.gpios + + Bank GPIOB: + GPIOB0: func rgmii-0 + GPIOB1: func rgmii-0 + GPIOB2: func uart4-0 + GPIOB7: input: 0 [x] mmc@58005000.cd-gpios + GPIOB11: func rgmii-0 + Configuration ------------- diff --git a/doc/usage/cmd/tftpput.rst b/doc/usage/cmd/tftpput.rst new file mode 100644 index 00000000000..52ba7b179a0 --- /dev/null +++ b/doc/usage/cmd/tftpput.rst @@ -0,0 +1,87 @@ +.. SPDX-License-Identifier: GPL-2.0+: + +tftpput command +=============== + +Synopsis +-------- + +:: + + tftpput address size [[hostIPaddr:]filename] + +Description +----------- + +The tftpput command is used to transfer a file to a TFTP server. + +By default the destination port is 69 and the source port is pseudo-random. +If CONFIG_TFTP_PORT=y, the environment variable *tftpsrcp* can be used to set +the source port and the environment variable *tftpdstp* can be used to set +the destination port. + +address + memory address where the data starts + +size + number of bytes to be transferred + +hostIPaddr + IP address of the TFTP server, defaults to the value of environment + variable *serverip* + +filename + path of the file to be written. If not provided, the client's IP address is + used to construct a default file name, e.g. C0.A8.00.28.img for IP address + 192.168.0.40. + +Example +------- + +In the example the following steps are executed: + +* setup client network address +* load a file from the SD-card +* send the file via TFTP to a server + +:: + + => setenv autoload no + => dhcp + BOOTP broadcast 1 + DHCP client bound to address 192.168.1.40 (7 ms) + => load mmc 0:1 $loadaddr test.txt + 260096 bytes read in 13 ms (19.1 MiB/s) + => tftpput $loadaddr $filesize 192.168.1.3:upload/test.txt + Using ethernet@1c30000 device + TFTP to server 192.168.1.3; our IP address is 192.168.1.40 + Filename 'upload/test.txt'. + Save address: 0x42000000 + Save size: 0x3f800 + Saving: ################# + 4.4 MiB/s + done + Bytes transferred = 260096 (3f800 hex) + => + +Configuration +------------- + +The command is only available if CONFIG_CMD_TFTPPUT=y. + +CONFIG_TFTP_BLOCKSIZE defines the size of the TFTP blocks sent. It defaults +to 1468 matching an ethernet MTU of 1500. + +If CONFIG_TFTP_PORT=y, the environment variables *tftpsrcp* and *tftpdstp* can +be used to set the source and the destination ports. + +CONFIG_TFTP_WINDOWSIZE can be used to set the TFTP window size of transmits +after which an ACK response is required. The window size defaults to 1. + +If CONFIG_TFTP_TSIZE=y, the progress bar is limited to 50 '#' characters. +Otherwise an '#' is written per UDP package which may decrease performance. + +Return value +------------ + +The return value $? is 0 (true) on success and 1 (false) otherwise. diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 73966c6e012..0fda121026e 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -66,6 +66,7 @@ Shell commands cmd/scp03 cmd/setexpr cmd/size + cmd/tftpput cmd/true cmd/ums cmd/wdt |