]> rtime.felk.cvut.cz Git - rpp-test-sw.git/commitdiff
Description texts modified, extended or added.
authorMichal Horn <hornmich@fel.cvut.cz>
Thu, 25 Jul 2013 16:46:24 +0000 (18:46 +0200)
committerMichal Horn <hornmich@fel.cvut.cz>
Thu, 25 Jul 2013 16:46:24 +0000 (18:46 +0200)
17 files changed:
commands/cmd.c
commands/cmd_adc.c
commands/cmd_can.c
commands/cmd_dac.c
commands/cmd_din.c
commands/cmd_emac.c
commands/cmd_fray.c
commands/cmd_hbr.c
commands/cmd_hout.c
commands/cmd_lin.c
commands/cmd_lout.c
commands/cmd_motor_example.c
commands/cmd_pin.c
commands/cmd_port.c
commands/cmd_sdram.c
commands/cmd_spi.c
commands/cmd_vbat.c

index efe43dadb3c2e20cc1b10ca595fc4615fe639c31..96f94f77b6bd3abd53b2edb142a24bda536ae4fa 100644 (file)
@@ -55,8 +55,6 @@
 /**
  *     @brief  Sleep the board
  *
- *     Command syntax: sleep
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -82,28 +80,28 @@ cmd_des_t const **cmd_list;
 /** Command descriptor for sleep command */
 cmd_des_t const cmd_des_sleep={
     0, 0,
-    "sleep","Sleep the board",
+    "sleep","Sleep the board.",
     "=== Description ===\n"
     "\n"
     "This command configures LIN and CAN peripherals to enter sleep mode\n"
-    "and turn the whole device into sleep mode. External signal on CAN will\n"
-    "wake the device up.\n",
+    "and turn the whole device into sleep mode. External signal on CAN or\n"
+    "LIN will wake the device up.\n",
     CMD_HANDLER(cmd_do_sleep), (void *)&cmd_list
 };
 
 /** Command descriptor for show help command */
 cmd_des_t const cmd_des_help={
     0, 0,
-    "help","prints help for commands",
-    "=== Syntax ===\n"
-    "\n"
-    " help [command]\n"
-    "\n"
+    "help","prints help for commands.",
     "=== Description ===\n"
     "\n"
     "This command without parameter prints the list of all available\n"
     "commands with short help text for each of them. If a parameter is\n"
-    "provided, the command prints help for the given command.\n",
+    "provided, the command prints help for the given command.\n"
+    "\n"
+    "=== Syntax ===\n"
+    "\n"
+    " help [command]\n",
     CMD_HANDLER(cmd_do_help), (void *)&cmd_list
 };
 
index 1b3a31bb5de8fa018bd2b97dd8b61d898ecedba4..51cae24325f0dc1dda74e54fa2bb8a369fed9cf0 100644 (file)
@@ -35,9 +35,7 @@
 
 
 /**
- * @brief Read ADC port
- *
- * Command syntax: readadc
+ * @brief Read values from ADC port
  *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
@@ -62,7 +60,7 @@ int cmd_do_read_adc1_values(cmd_io_t *cmd_io, const struct cmd_des *des, char *p
 /** Descriptor of command for adc port reading */
 cmd_des_t const cmd_des_read_adc1={
     0, 0,
-    "readadc","Reads values from ADC1",
+    "readadc","Reads values from ADC1.",
     "=== Description ===\n"
     "\n"
     "This command reads values on all ADIN 1-12 channels and prints it as\n"
index 2d163a9669c62ff64254314a42ed87c2309f4dfa..3638bb58bb9fa41c53805da61a999942d4ce045c 100644 (file)
@@ -107,11 +107,6 @@ uint32_t canCheckForError(canBASE_t *node, const char* str, uint32_t *errorStatu
 /**
  *     @brief  Command for external CAN loopback testing.
  *
- *     Command syntax: testcan src dest, where src and dest are numbers of CAN in range 1 - 3 and can not be equal.
- *
- *     Command resets CAN bus and than sends 100 times message from source and destination.
- *     During the sending process number of tx errors, rx errors, tx timeouts and rx timeouts is being tracked.
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -252,7 +247,7 @@ int cmd_do_test_can_loopback(cmd_io_t *cmd_io, const struct cmd_des *des, char *
 /** @brief command descriptor for test CAN loopback command */
 cmd_des_t const cmd_des_test_can_loopback={
     0, 0,
-    "testcan","testcan src<1;3> dest<1;3> Test CAN loopback between src and dest.",
+    "Test CAN loopback between source and destination nodes.",
     "=== Description ===\n"
     "\n"
     "This command tests CAN bus by sending and receiving messages through\n"
@@ -268,7 +263,7 @@ cmd_des_t const cmd_des_test_can_loopback={
     "\n"
     "=== Command syntax ===\n"
     "\n"
-    " testcan SOURCE DESTINATION\n"
+    "   --> testcan SOURCE DESTINATION\n"
     "where SOURCE and DESTINATION is a number in the range 1-3 and SOURCE\n"
     "is not equal DESTINATION.\n"
     "\n"
index 2afd3cfe90722330b0adc906314346a530e1501e..21af7faaca994367046e31e9cac996c947fc9cca 100644 (file)
 /**
  * @brief      Setup DAC pin enable or disable
  *
- * Command syntax: dacsetupX:Y
- *             where:  X - pin nubmer 1-16
- *                             Y - 1 = enable
- *                                     0 = disable
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -79,10 +74,6 @@ int cmd_do_dac_pin_setup(cmd_io_t *cmd_io, const struct cmd_des *des, char *para
 /**
  * @brief      Set DAC pin raw value
  *
- * Command syntax: dacsetvalX:Y
- *             where:  X - pin nubmer 1-16
- *                             Y - value (0 ; 4095)
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -123,10 +114,6 @@ int cmd_do_dac_pin_set_val(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
 /**
  * @brief      Set DAC pin voltage value in mV units
  *
- * Command syntax: dacsetvoltageX:Y
- *             where:  X - pin nubmer 1-16
- *                             Y - voltage (0 ; 12000)
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -169,52 +156,94 @@ int cmd_do_dac_pin_set_voltage(cmd_io_t *cmd_io, const struct cmd_des *des, char
 /** Descriptor of command for dac pin setup */
 cmd_des_t const cmd_des_dac_pin_setup = {
        0, CDESM_OPCHR|CDESM_WR,
-       "dacpinsetup#","dacpinsetupX:Y - Enables or disables DAC pin number X. Y equal 1 means enable, 0 means disable.",
-       "\n",
+       "dacpinsetup#","Enables or disables DAC pin number. 1 means enable, 0 means disable.",
+       "=== Description ===\n"
+       "\n"
+       "Command provides enabling and disabling function for DAC pin.\n"
+       "\n"
+       "Command expects first parameter, operation character and \n"
+       "second parameter. First parameter specifies number of pin (1-4),\n"
+       "operation character : (setter) and the second binary parameter specifies\n"
+       "enables (1) or disables (0) the pin. \n"
+       "\n"
+       "Command always prints actual state of selected pin.\n"
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> dacpinsetupPIN[:][VALUE] \n"
+       "where\n"
+       "* PIN is in range 1-4\n"
+       "* : means set value VALUE to pin PIN\n"
+       "* VALUE is in range 0-1\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> dacpinsetup1:1\n"
+       "Enables pin DAC1 and print its actual state (which should be 1)\n",
        CMD_HANDLER(cmd_do_dac_pin_setup), (void *)&cmd_list_dac
 };
 
 /** Descriptor of command for dac pin value set */
 cmd_des_t const cmd_des_dac_pin_set_val = {
        0, CDESM_OPCHR|CDESM_WR,
-       "dacpinval#","dacpinvalX:Y - Sets value Y to pin DAC X.",
+       "dacpinval#","Sets raw value to pin DAC.",
        "=== Description ===\n"
        "\n"
-       "Command provides set and get function for DAC pin voltage.\n"
+       "Command provides set function for DAC pin raw value.\n"
        "\n"
-       "Command expects first parameter, oparation character and eventually\n"
+       "Command expects first parameter, operation character and \n"
        "second parameter. First parameter specifies number of pin (1-4),\n"
-       "operation character : (setter) or ? (getter) and in case of set\n"
-       "operation character, the second parameter specifies voltage in mV to\n"
-       "be set on pin.\n"
+       "operation character : (setter) and the second parameter specifies\n"
+       "raw value to be set on pin. This value sets voltage on the selected\n"
+       "pin according to the formula described in datasheet. \n"
        "\n"
-       "Command always prints actual voltage of selected pin.\n"
+       "Command always prints actual raw value of selected pin.\n"
        "\n"
        "=== Command syntax ===\n"
        "\n"
-       "   --> dacpinvalPIN[:|?][VALUE] \n"
-       "     where PIN is in range 1-4\n"
-       "     where : means set voltage VALUE to pin PIN\n"
-       "     where ? means get voltage of pin PIN\n"
+       "   --> dacpinvalPIN[:][VALUE] \n"
+       "where\n"
+       "* PIN is in range 1-4\n"
+       "* : means set raw value VALUE to pin PIN\n"
+       "* VALUE is in range 0-4095\n"
        "\n"
        "=== Example ===\n"
        "\n"
-       "   --> dacpinval1:8000\n"
-       "Set pin DAC1 to 8V, prints actual voltage (which should be 8000)\n"
-       "\n"
-       "   --> dacpinval2:500\n"
-       "Set pin DAC2 to 500mV, prints actual voltage (which should be 500)\n"
-       "\n"
-       "   --> dacpinval2?\n"
-       "Get voltage of pin DAC2 and print it\n",
+       "   --> dacpinval1:4095\n"
+       "Set pin DAC1 to 12V, prints actual raw value (which should be 4095)\n",
        CMD_HANDLER(cmd_do_dac_pin_set_val), (void *)&cmd_list_dac
 };
 
 /** Descriptor of command for dac pin voltage set */
 cmd_des_t const cmd_des_dac_pin_set_voltage = {
        0, CDESM_OPCHR|CDESM_WR,
-       "dacpinvoltage#","dacpinvoltageX:Y - Sets voltage Y mV to pin DAC X.",
-       "\n",
+       "dacpinvoltage#","Sets voltage in mV to pin DAC.",
+       "=== Description ===\n"
+       "\n"
+       "Command provides set function for DAC pin voltage.\n"
+       "\n"
+       "Command expects first parameter, operation character and \n"
+       "second parameter. First parameter specifies number of pin (1-4),\n"
+       "operation character : (setter) the second parameter specifies voltage \n"
+       "in mV to be set on pin.\n"
+       "\n"
+       "Command always prints actual voltage of selected pin.\n"
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> dacpinvoltage[:][VALUE] \n"
+       "where\n"
+       "* PIN is in range 1-4\n"
+       "* : means set voltage VALUE to pin PIN\n"
+       "* VALUE is in range 0-12000\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> dacpinvoltage1:8000\n"
+       "Set pin DAC1 to 8V, prints actual voltage (which should be 8000)\n"
+       "\n"
+       "   --> dacpinvoltage2:500\n"
+       "Set pin DAC2 to 500mV, prints actual voltage (which should be 500)\n",
        CMD_HANDLER(cmd_do_dac_pin_set_voltage), (void *)&cmd_list_dac
 };
 
index 434b0962270b5920b3543dcc10bdfc81a33e9d76..4d4fbce849879fc702af126c34d729e450401847 100644 (file)
 /**
  * @brief      Setup DIN pin parameters (Pull up/down, tristate/active, IRQ and wakeup disable/enable
  *
- * Command syntax: dinsetupX:(A,B,C)
- *             where:  X - pin nubmer 1-16
- *                             A - 1 = pull up (switch to ground)
- *                                     0 = pull down (switch to battery)
- *                             B - 1 = tri-state
- *                                     0 = active
- *                             C - 1 = can wake up, IRQ enable
- *                                     0 = wake up and IRQ disabled
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -95,10 +86,6 @@ int cmd_do_din_setup(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /**
  * @brief      Get value from DIN pin
  *
- * Command syntax: dingetX:Y
- *             where:  X - pin nubmer 1-16
- *                             Y - treshold (not yet implemented)
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -140,9 +127,6 @@ int cmd_do_din_get(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
 /**
  * @brief      Read DIN diagnostic value
  *
- * Command syntax: dindiagX?
- *             where:  X - pin nubmer 1-16
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -178,28 +162,96 @@ int cmd_do_din_diag(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /** Command descriptor for din state command */
 cmd_des_t const cmd_des_din_setup={
        0, CDESM_OPCHR|CDESM_WR,
-       "dinsetup*", "Setup DIN pin parameters (Pull up/down, tristate/active, IRQ and wakeup disable/enable)",
-       "TODO\n"
-       " dinsetupX:(pull-type,active,can-wake) - Sets up DIN X pin.\n"
-       " Pull-type: 1 - pull up (switch-to-ground); 0 - pull down (switch-to-battery)\n"
-       " Active: 1 - tri-state; 0 - active\n"
-       " Can-wake: 1 - pin can wake module up and set an interrupt; 0 - wake up and interrupt disabled.\n",
+       "dinsetup*", "Setup DIN pin parameters (Pull up/down, tristate/active, IRQ and wakeup disable/enable).",
+       "=== Description ===\n"
+       "\n"
+       "Command provides setup function for DIN pin. Every input can be set as\n"
+       "pull up (switch to ground) or pull down (switch to battery);\n"
+       "tri-state or active and wake-up function with IRQ can be activated.\n"
+       "\n"
+       "Command expects first parameter, operation character and \n"
+       "second parameter. First parameter specifies number of pin (1-16),\n"
+       "operation character : (setter) and three arguments in parentheses, separated\n"
+       "by colons.\n"
+       "The first argument specifies pull resistor (1 - pull up, 0 - pull down),\n"
+       "The second argument specifies whether the input is tri-state (1) or active (0),\n"
+       "The third argument activates (1) or deactivates (0) wake up function  and IRQ generation.\n"
+       "\n"
+       "Command always prints final state of arguments pull-type|active|wake in this order.\n"
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> dinsetupPIN[:](A,B,C) \n"
+       "where\n"
+       "* PIN is in range 1-16\n"
+       "* : means setup the PIN\n"
+       "* A is in range 0-1 and\n"
+       "** 1 = pull up (switch to ground)\n"
+       "** 0 = pull down (switch to battery)\n"
+       "* B is in range 0-1 and\n"
+       "** 1 = tri-state\n"
+       "** 0 = active\n"
+       "* C is in range 0-1 and\n"
+       "** 1 = can wake up, IRQ enable\n"
+       "** 0 = wake up and IRQ disabled\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> dinsetup1:(1,0,0)\n"
+       "Sets the DIN1 as switch to ground, active and disables IRQ generation and wake up function.\n",
        CMD_HANDLER(cmd_do_din_setup), (void *)&cmd_list_din
 };
 
 /** Command descriptor for din state command */
 cmd_des_t const cmd_des_din_get={
        0, CDESM_OPCHR|CDESM_WR,
-       "dinget*","dingetX:Y Read value from DIN X pin with treshold Y",
-       "\n",
+       "dinget*","Read value from DIN pin with threshold.",
+       "=== Description ===\n"
+       "\n"
+       "Command gets value from DIN pin. Treshold is not yet implemented.\n"
+       "\n"
+       "Command expects first parameter, operation character and \n"
+       "second parameter. First parameter specifies number of pin (1-16),\n"
+       "operation character is : and second parameter specifies treshold.\n"
+       "\n"
+       "Command prints value of the DIN pin\n"
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> dingetPIN[:]TR \n"
+       "where\n"
+       "* PIN is in range 1-16\n"
+       "* TR is not yet implemented\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> dinget1:0\n"
+       "Prints value of the DIN1.\n",
        CMD_HANDLER(cmd_do_din_get), (void *)&cmd_list_din
 };
 
 /** Command descriptor for din state command */
 cmd_des_t const cmd_des_din_diag={
        0, CDESM_OPCHR|CDESM_RD,
-       "dindiag*","dindiagX? Read diagnostic value from DIN X pin",
-       "\n",
+       "dindiag*","Read diagnostic value from DIN pin.",
+       "=== Description ===\n"
+       "\n"
+       "Command reads value from diagnostic pin of DIN.\n"
+       "\n"
+       "Command expects first, which specifies number of pin (1-16), and\n"
+       "operation character ?\n"
+       "\n"
+       "Command prints value of the diagnostic signal of the specified DIN pin\n"
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> dindiagPIN[?] \n"
+       "where PIN is in range 1-16\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> dindiag1?\n"
+       "Prints value of the diagnostic signal of DIN1.\n",
        CMD_HANDLER(cmd_do_din_diag), (void *)&cmd_list_din
 };
 
index cbacef464d9757863652c93d1c266bff81899b24..aa38608417801b5b4c12ce1d2a129629f0175be5 100644 (file)
@@ -264,7 +264,7 @@ int emac_test(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 
 cmd_des_t const cmd_des_test_ethernet={
     0, 0,
-    "ethernet", "Try to send few ethernet frames",
+    "ethernet", "Try to send few ethernet frames.",
     "=== Description ===\n"
     "\n"
     "Command tries to send few ethernet frames. No real connection or real\n"
index de781bf23f31d019b0b41a0aa3275c01e240d29f..2dc17dbeae22406e9a8fb0ec7c1dd7f98cc83bd5 100644 (file)
@@ -313,12 +313,6 @@ int cmd_do_fray_status(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
 /**
  *     @brief  Start sending and receiving data on as node A
  *
- *     Command initializes FRAY1 node A, waits for node B and start sending and receiving data.
- *     When data are received correctly, "O" is printed, when incorrectly, "X" is prited.
- *     Number of errors and received messages is counting.
- *
- *     There is command for node B, which should be launched on another device.
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -372,12 +366,6 @@ int cmd_do_test_frayA(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]
 /**
  *     @brief  Start sending and receiving data on as node B
  *
- *     Command initializes FRAY1 node B, waits for node A and start sending and receiving data.
- *     When data are received correctly, "O" is printed, when incorrectly, "X" is prited.
- *     Number of errors and received messages is counting.
- *
- *     There is command for node A, which should be launched on another device.
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -434,13 +422,12 @@ int cmd_do_test_frayB(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]
 /** Command descriptor for FlexRay status command */
 cmd_des_t const cmd_des_fray_stat={
        0, 0,
-       "fraystat#","get FRAYX status in human readable form",
+       "fraystat#","get FRAYX status in human readable form.",
        "=== Description ===\n"
        "\n"
        "Command receives response from Flexrey driver through SPI, translates\n"
-       "it and prints in human readable form. Command expects suffix, which\n"
-       "determines FRAY number.\n"
-       "\n"
+       "it and prints in form of atribut-value table. Command expects suffix,\n"
+       "which determines FRAY number.\n"
        "\n"
        "=== Command syntax ===\n"
        "\n"
@@ -458,15 +445,16 @@ cmd_des_t const cmd_des_fray_stat={
 /** Command descriptor for FlexRay 1 test node A */
 cmd_des_t const cmd_des_test_fray_a={
            0, 0,
-           "testfrayA","Run FlexRay test as A node",
+           "testfrayA","Run FlexRay test as A node.",
            "=== Description ===\n"
            "\n"
-           "Commands creates FlexRay node A and starts infinite sending and\n"
-           "receiving messages. Command should be run with two devices connected\n"
-           "in FlexRay bus and the second one running testfrayB command. Nothing\n"
-           "is printed while the test, so some analysator should be connected in\n"
-           "the bus.\n"
+           "Commands creates FlexRay node A and starts sending and\n"
+           "receiving 100 messages. Command should be run with two devices\n"
+           "connected in FlexRay bus and the second one running testfrayB command.\n"
            "\n"
+           "Command prints O when message is received correctly, X is printed otherwise.\n"
+           "Number of RX errors and successfully received messages is counted and printed\n"
+           "in the end.\n"
            "=== Command syntax ===\n"
            "\n"
            "   --> testfrayA\n",
@@ -476,15 +464,16 @@ cmd_des_t const cmd_des_test_fray_a={
 /** Command descriptor for FlexRay 1 test node B */
 cmd_des_t const cmd_des_test_fray_b={
            0, 0,
-           "testfrayB","Run FlexRay test as B node",
+           "testfrayB","Run FlexRay test as B node.",
            "=== Description ===\n"
            "\n"
-           "Commands creates FlexRay node B and starts infinite sending and\n"
-           "receiving messages. Command should be run with two devices connected\n"
-           "in FlexRay bus and the second one running testfrayA command. Nothing\n"
-           "is printed while the test, so some analysator should be connected in\n"
-           "the bus.\n"
+           "Commands creates FlexRay node B and starts sending and\n"
+           "receiving 100 messages. Command should be run with two devices\n"
+           "connected in FlexRay bus and the second one running testfrayA command.\n"
            "\n"
+           "Command prints O when message is received correctly, X is printed otherwise.\n"
+           "Number of RX errors and successfully received messages is counted and printed\n"
+           "in the end.\n"
            "=== Command syntax ===\n"
            "\n"
            "   --> testfrayB\n",
index 4177a9311e2bc51bec271cb60eb4b19bfe4c904a..d4ddf93bd227dc07339f4a4a2c79fd2991f229d5 100644 (file)
 /**
  * @brief      Enable HBR driver with given period of PWM
  *
- * Value given as a parameter means period of PWM. If lower than zero, default value is used instead.
- * If driver is enabled already, command ends with error.
- *
- * This command should be called before any other HBR commands.
- *
- * Command syntax: hbrenable:X
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -73,12 +66,6 @@ int cmd_do_hbr_enable(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]
 /**
  * @brief      Control HBR driver with given value <-100; 100>
  *
- * Value in parameter means duty cycle of PWM period in %. Sigh of the value
- * means direction.
- * Driver must be enabled by hbrenable command before this command can be used.
- *
- * Command syntax: hbrcontrol:X
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -111,10 +98,6 @@ int cmd_do_hbr_control(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
 /**
  * @brief      Disable HBR driver.
  *
- * If already disabled, command ends with error.
- *
- * Command syntax: hbrdisable
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -135,23 +118,94 @@ int cmd_do_hbr_disable(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[
 cmd_des_t const cmd_des_hbr_enable = {
     0, CDESM_OPCHR|CDESM_WR,
     "hbrenable","Enables H-bridge with given period.",
-    "\n",
+       "=== Description ===\n"
+       "\n"
+       "Command enables H-bridge, which means that enable signal is set, watchdog\n"
+    "reset task is started and PWM is configured with specified period and\n"
+    "duty cycle 0%.\n"
+    "\n"
+    "Command expects operation character : and one parameter, which specifies\n"
+    "a period (in us) of the PWM signal in the HBR output.\n"
+    "\n"
+       "If period is lower than zero, default frequency 18kHz is used instead.\n"
+    "This command should be called befor any other HBR command is used.\n"
+    "If HBR is already enabled, command returns with error.\n"
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> hbrenable:X\n"
+       "where X is PWM period in us\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> hbrenable:1000\n"
+       "\n"
+       "Enables HBR with period 1kHz. HBR output is still inactive, but ready for\n"
+    "other commands calls.\n",
     CMD_HANDLER(cmd_do_hbr_enable), (void *)&cmd_list_hbr
 };
 
 /** Command descriptor for HBR control command */
 cmd_des_t const cmd_des_hbr_control = {
     0, CDESM_OPCHR|CDESM_WR,
-    "hbrcontrol","Sets direction and PWM duty cycle <-100; 100>",
-    "\n",
+    "hbrcontrol","Sets direction and PWM duty cycle <-100; 100>.",
+       "=== Description ===\n"
+       "\n"
+       "Command controls the direction and speed of the motor connected to HBR.\n"
+    "\n"
+    "Command expects operation character : and one parameter, which specifies\n"
+    "the direction and speed. Negative values set one direction and positive\n"
+    "values set the other direction. Absolute value has to be i range 0-100,\n"
+    "because it in fact specifies duty cycle in % of the PWM. This means thah\n"
+    "-100 is the maximum (100%) speed in one direction, 25 is 25% speed in the other\n"
+    "direction. When the value is 0, the output is inactive."
+    "\n"
+       "HBR has to be enabled by hbrenable command befor this one can be called.\n"
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> hbrcontrol:X\n"
+       "where X specifies direction and PWM duty cycle in % (thus in range -100 - 100)\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> hbrcontrol:-25\n"
+       "\n"
+       "Activates motor rotation to the left with 25% speed.\n"
+       "\n"
+       "   --> hbrcontrol:25\n"
+       "\n"
+       "Activates motor rotation to the right with 25% speed.\n"
+       "\n"
+       "   --> hbrcontrol:0\n"
+       "\n"
+       "Deactivates motor rotation.\n",
     CMD_HANDLER(cmd_do_hbr_control), (void *)&cmd_list_hbr
 };
 
 /** Command descriptor for HBR disable command */
 cmd_des_t const cmd_des_hbr_disable = {
     0, 0,
-    "hbrdisable","Disables H-bridge",
-    "\n",
+    "hbrdisable","Disables H-bridge.",
+       "=== Description ===\n"
+       "\n"
+       "Command disables HBR, which means that PWM is stopped and enable signal is\n"
+    "cleared. Watchdog task is left running, because it is harmless.\n"
+    "\n"
+    "Command expects no parameters."
+    "\n"
+       "After HBR is disabled, it can not be controlled by any command until it\n"
+    "is reenabled egain by hbrenable command\n."
+       "\n"
+       "=== Command syntax ===\n"
+       "\n"
+       "   --> hbrdisable\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> hbrdisable\n"
+       "\n"
+       "Stops motor and disables H-bridge.\n",
     CMD_HANDLER(cmd_do_hbr_disable), (void *)&cmd_list_hbr
 };
 
index 1d07c0033307f7f3f0441397980fc1be7d7cf6d8..0618da8b8a607d14ddf90d27e56dcfc30a2c5c76 100644 (file)
@@ -39,8 +39,6 @@
 /**
  * @brief      Reads values from HOUT_IFBK pins (subset of ADC)
  *
- * Command syntax: readhifbk
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -70,12 +68,6 @@ int cmd_do_read_hout_ifbk_values(cmd_io_t *cmd_io, const struct cmd_des *des, ch
 /**
  * @brief      Runs test of selected HOUT pin.
  *
- * This command runs a test to check if HOUT pin is in good or fault condition.
- * When HOUT is OK, HOUT_DIAG pin has the same value as HOUT_IN pin.
- * When HOUT is in fault state, HOUT_DIAG periodically follows HOUT_PIN for 2ms and shorts to ground for 2ms.
- *
- * Command syntax: houtfail#
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -109,9 +101,6 @@ int cmd_do_test_hout_fault(cmd_io_t *cmd_io, const struct cmd_des *des, char *pa
 /**
  *     @brief  Set or get actual pwm parameters
  *
- *     Command syntax: houtpwm:(p,d)   - set p as a period in us and D as duty cycle in % of the period.
- *                                     houtpwm?        - Get actual PWM parameters, period in us and duty cycle in % of the period.
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -156,8 +145,6 @@ int cmd_do_hout_pwm(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /**
  *     @brief  Start PWM, if it was previously set by houtpwm command
  *
- *     Command syntax: houtpwmstart
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -185,8 +172,6 @@ int cmd_do_hout_pwm_start(cmd_io_t *cmd_io, const struct cmd_des *des, char *par
 /**
  *     @brief  Stop PWM
  *
- *     Command syntax: houtpwmstop
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -210,28 +195,35 @@ int cmd_do_hout_pwm_stop(cmd_io_t *cmd_io, const struct cmd_des *des, char *para
 /** Command descriptor for test hout fault state command */
 cmd_des_t const cmd_des_test_hout_fail = {
     0, 0,
-    "houtfail","Test if some HOUT port is in fault state",
+    "houtfail","Test if some HOUT pin is in fault state.",
     "=== Description ===\n"
     "\n"
     "This command tests, if HOUT pin is in good condition. When a circuit,\n"
-    "controlling HOUT pin, detects some fault, it starts to generate signal\n"
-    "on HOUT_DIAG pin.\n"
+    "controlling HOUT pin, detects some failure, it starts to generate signal\n"
+    "on HOUT_DIAG pin. This command is supposed to detect such a state.\n"
+    "\n"
+    "Command expects one parameter (1-6), which specifies pin number."
     "\n"
     "=== Command syntax ===\n"
     "\n"
-    "   --> houtfail pin\n"
-    "where pin is in range 1-6\n",
+    "   --> houtfail PIN\n"
+    "where PIN is in range 1-6\n"
+    "=== Example ===\n"
+    "\n"
+    "   --> houtfail 1\n"
+    "\n"
+    "Detects state of the HOUT1 and prints OK, FAIL or NOT RUNNING.\n",
     CMD_HANDLER(cmd_do_test_hout_fault), (void *)&cmd_list_hout
 };
 
 /** Command descriptor for hout read IFBK command */
 cmd_des_t const cmd_des_read_hifbk={
     0, 0,
-    "readhifbk","Reads values from HOUT IFBK",
+    "readhifbk","Reads values from HOUT IFBK.",
     "=== Description ===\n"
     "\n"
-    "Command reads analog values on HOUT_IFBK pins.\n"
-    "\n"
+    "Command reads analog values on HOUT_IFBK pins and prints\n"
+    "them in HOUTX-value table.\n"
     "\n"
     "=== Command syntax ===\n"
     "\n"
@@ -239,10 +231,10 @@ cmd_des_t const cmd_des_read_hifbk={
     CMD_HANDLER(cmd_do_read_hout_ifbk_values), (void *)&cmd_list_hout
 };
 
-/** Command descriptor for HBR set PWM command */
+/** Command descriptor for HOUT set PWM command */
 cmd_des_t const cmd_des_hout_pwm={
     0, CDESM_OPCHR|CDESM_RW,
-    "houtpwm*","Set or get actual PWM parameters",
+    "houtpwm*","Set or get actual PWM parameters.",
     "=== Description ===\n"
     "\n"
     "This command can be used for setting or getting HOUT PWM parameters.\n"
@@ -269,38 +261,52 @@ cmd_des_t const cmd_des_hout_pwm={
     "\n"
     "   --> hbrpwm1?\n"
     "\n"
-    "Actual period of HOUT1 PWM in us and duty cycle in % will be printed.\n",
+    "Prints actual period of HOUT1 PWM in us and duty cycle in %.\n",
     CMD_HANDLER(cmd_do_hout_pwm), (void *)&cmd_list_hout
 };
 
 /** Command descriptor for PWM start command */
 cmd_des_t const cmd_des_hout_pwm_start={
     0, 0,
-    "houtpwmstart#","houtpwmstartX - Start generating of pwm signal on HOUTX",
+    "houtpwmstart#","Start generating PWM signal on HOUT.",
     "=== Description ===\n"
     "\n"
-    "If HOUT PWM was previously set by houtpwm command, this command starts\n"
-    "generating PWM signal on specified pin.\n"
+    "If HOUT PWM was previously set by houtpwm command, this command starts to\n"
+    "generate PWM signal on specified pin.\n"
+    "Command expects one paramete, which specifies number of pin (1-6)"
     "\n"
     "=== Command syntax ===\n"
     "\n"
     "   --> houtpwmstartPIN\n"
-    "where PIN is in range 1-6\n",
+    "where PIN is in range 1-6\n"
+    "\n"
+    "=== Example ===\n"
+    "\n"
+    "   --> houtpwmstart1\n"
+    "\n"
+    "HOUT1 PWM generation will be activated.\n",
     CMD_HANDLER(cmd_do_hout_pwm_start), (void *)&cmd_list_hout
 };
 
 /** Command descriptor for PWM stop command */
 cmd_des_t const cmd_des_hout_pwm_stop={
     0, 0,
-    "houtpwmstop#","houtpwmstopX - Stop generating of pwm signal on HOUTX",
+    "houtpwmstop#","Stop generating of PWM signal on HOUT.",
     "=== Description ===\n"
     "\n"
     "This command stops generating PWM signal on selected pin.\n"
+    "Command expects one parameter, whic specifies number of pin (1-6)\n"
     "\n"
     "=== Command syntax ===\n"
     "\n"
     "   --> houtpwmstopPIN\n"
-    "where PIN is in range 1-6\n",
+    "where PIN is in range 1-6\n"
+    "\n"
+    "=== Example ===\n"
+    "\n"
+    "   --> houtpwmstop1\n"
+    "\n"
+    "HOUT1 PWM generation will be deactivated.\n",
     CMD_HANDLER(cmd_do_hout_pwm_stop), (void *)&cmd_list_hout
 };
 
index 67e99f203a895770b1d3ed92e91e6a73d28e474f..02d1992726138722018774760263efd753ab349a 100644 (file)
@@ -59,8 +59,6 @@ void linNotification(linBASE_t *lin, uint32_t flags)
 }
 
 /**    @brief Command for testing LIN loopback
- *
- *     Command sends short data chunk and counts errors when receiving through loopback.
  *
  * @param[in]  cmd_io  Pointer to IO functions
  * @param[in]  cmd_des Pointer to command descriptor
@@ -116,7 +114,7 @@ int cmd_do_lin_loop_back(cmd_io_t *cmd_io, const struct cmd_des *des, char *para
 /** Descriptor of command for lin loopback test */
 cmd_des_t const cmd_des_lin_loop_back={
     0, 0,
-    "testlin","Test digital loopback on LIN",
+    "testlin","Test digital loopback on LIN.",
     "=== Description ===\n"
     "\n"
     "This command can be used for testing LIN. Command starts sending short\n"
index 97c1bfc8f7e3bf100f2aa9cd68a0b1cb62327ec2..88a408fb493541e387af57a7fa45c08d1a85b4fd 100644 (file)
@@ -38,8 +38,6 @@
 /**
  * @brief Set digital value to LOUT pin
  *
- * Command syntax: loutsetX:Y
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -77,8 +75,6 @@ int cmd_do_lout_set(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /**
  * @brief Read digital diagnostic value from LOUT DIAG pin
  *
- * Command syntax: loutdiagX?
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -115,16 +111,56 @@ int cmd_do_lout_diag(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /** Command descriptor for lout set port value */
 cmd_des_t const cmd_des_lout_set={
        0, CDESM_OPCHR|CDESM_WR,
-       "loutset#","loutsetX:Y - Set Y value to LOUT X pin",
-       "\n",
+       "loutset#","Set value to LOUT pin.",
+    "=== Description ===\n"
+    "\n"
+       "Command sets digital value on an output pin LOUT.\n"
+       "Command expects first parameter, operation character :\n"
+       "and second parameter. The first one specifies number of\n"
+       "pin, the second one specifies value to be set on the output.\n"
+    "\n"
+    "=== Command syntax ===\n"
+    "\n"
+    "   --> loutsetPIN:VALUE\n"
+    "where\n"
+    "* PIN is in range 1-8\n"
+    "* : means set VALUE on PIN\n"
+    "* VALUE is binary value to be set\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> loutset1:1\n"
+       "\n"
+       "Sets 1 to LOUT1\n"
+       "\n"
+       "   --> loutset2:0\n"
+       "\n"
+       "Sets 0 to LOUT2\n",
        CMD_HANDLER(cmd_do_lout_set), (void *)&cmd_list_lout
 };
 
 /** Command descriptor for lout get pin diag value */
 cmd_des_t const cmd_des_lout_diag={
        0, CDESM_OPCHR|CDESM_RD,
-       "loutdiag#","loutdiagX? - Reads diag value from LOUT X pin",
-       "\n",
+       "loutdiag#","Reads diagnostic value from LOUT pin.",
+    "=== Description ===\n"
+    "\n"
+       "Command reads digital value from LOUT diagnostic signal.\n"
+       "Command expects first parameter and operation character ? .\n"
+       "The parameter specifies number of pin.\n"
+    "\n"
+    "=== Command syntax ===\n"
+    "\n"
+    "   --> loutdiagPIN?\n"
+    "where\n"
+    "* PIN is in range 1-8\n"
+    "* ? means get value from PIN\n"
+       "\n"
+       "=== Example ===\n"
+       "\n"
+       "   --> loutdiag1?\n"
+       "\n"
+       "Reads value from LOUT1 diagnostic signal.\n",
        CMD_HANDLER(cmd_do_lout_diag), (void *)&cmd_list_lout
 };
 
index a0bc467a6bc10313b4050595acdb87ccbe181d0e..b27a3a2bad627bc945f13f0b79ea11bb3f1239da 100644 (file)
@@ -213,8 +213,6 @@ int receive_control_data(int* enable, int* direction, int* duty) {
 /**
  * @brief      Read data from control panel and send them to motor controller through FlexRay
  *
- * Command syntax:     control
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -304,8 +302,6 @@ int cmd_do_control(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
 /**
  * @brief      Receive data from FlexRay and control motor on HBR
  *
- * Command syntax:     motor
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -370,16 +366,38 @@ int cmd_do_motor(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
 /** Command descriptor for control */
 cmd_des_t const cmd_des_control={
                0, 0,
-               "control","Run example - control panel",
-               "\n",
+               "control","Run example - control panel.",
+           "=== Description ===\n"
+           "\n"
+               "Commands creates a FlexRay node and starts to read buttons and\n"
+               "potentiometer from control panel. Data from control panel are send\n"
+               "via FlexRay to the second node, created by running motor command."
+               "\n"
+               "The purpose of this pair of commands is to demonstrate functionality\n"
+               "of the FlexRay, ADC, DIN and HBR peripherals.\n"
+           "\n"
+           "=== Command syntax ===\n"
+           "\n"
+           "   --> control\n",
                CMD_HANDLER(cmd_do_control), (void *)&cmd_list_motor_example
        };
 
 /** Command descriptor for motor */
 cmd_des_t const cmd_des_motor={
                0, 0,
-               "motor","Run example - motor controller",
-               "\n",
+               "motor","Run example - motor controller.",
+           "=== Description ===\n"
+           "\n"
+               "Commands creates a FlexRay node and starts to receive data from node\n"
+               "created by command control. Received data are applied on HBR to control\n"
+               "DC motor.\n"
+               "\n"
+               "The purpose of this pair of commands is to demonstrate functionality\n"
+               "of the FlexRay, ADC, DIN and HBR peripherals.\n"
+           "\n"
+           "=== Command syntax ===\n"
+           "\n"
+           "   --> motor\n",
                CMD_HANDLER(cmd_do_motor), (void *)&cmd_list_motor_example
        };
 
index a23c22c737ee5581eb6755004a287e038caf3851..414788fe7553b263ffc9771dcfa3b4345b4e6733 100644 (file)
@@ -39,8 +39,6 @@
 /**
  * @brief      Print list of pins
  *
- * Command syntax:     pinlist
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -60,9 +58,6 @@ int cmd_do_pin_list(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /**
  * @brief      Set or get pin value
  *
- * Command syntax:     pinvalNAME:v    - set value v (1 or 0) to pin NAME (can be obtained by pinlist command)
- *                                     pinvalNAME?             - get value on pin NAME (can be obtained by pinlist command)
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -97,9 +92,6 @@ int cmd_do_pin_val(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
 /**
  * @brief      Set or get pin direction
  *
- * Command syntax:     pindirNAME:v    - set direction 1-out, 0-in to pin NAME (can be obtained by pinlist command)
- *                                     pindirNAME?             - get direction of pin NAME (can be obtained by pinlist command)
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -146,30 +138,41 @@ int cmd_do_pin_dir(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[]) {
 /** Command descriptor for pin list */
 cmd_des_t const cmd_des_pin_list = {
     0, 0,
-    "pinlist","Prints list of all defined pins",
-    "\n",
+    "pinlist","Prints list of all defined pins.",
+    "=== Description ===\n"
+    "\n"
+    "Commands prints list of all defined pins accessible by pinval\n"
+    "and pindir commands\n"
+    "\n"
+    "=== Command syntax ===\n"
+    "\n"
+    "   --> pinlist\n",
     CMD_HANDLER(cmd_do_pin_list), (void *)&cmd_list_pin
 };
 
 /** Command descriptor for pin get/set value */
 cmd_des_t const cmd_des_pin_val={
        0, CDESM_OPCHR|CDESM_RW,
-       "pinval*","Sets or get pin value",
+       "pinval*","Sets or get pin value.",
        "=== Description ===\n"
        "\n"
        "This command is used as setter and getter for selected pin. Command\n"
-       "expects suffix, which specifies the name of the pin. Than operation\n"
+       "expects first parameter, operation character and eventually second parameter\n"
+       "The first parameter specifies name of the pin, operation\n"
        "character : (setter) or ? (getter) and if setter, last parameter\n"
-       "specifies value to be assigned.\n"
+       "specifies value to be assigned to the pin.\n"
        "\n"
        "Pin name can be obtained by pinlist command.\n"
        "\n"
+       "Most of the pins are accessible indirectly via highlevel commands\n"
+       "HBR_EN is for example controlled by hbrenable command. This command\n"
+       "serves as supplement to highlevel commands for testing purpose.\n"
        "=== Command syntax ===\n"
        "\n"
        "   --> pinvalNAME[:|?][VAL]\n"
        "where\n"
        "* NAME is a string\n"
-       "* : means assign VAL to pi NAME and ? means get value from pin NAME\n"
+       "* : means assign VAL to pin NAME and ? means get value from pin NAME\n"
        "* VAL can be 0 or 1\n"
        "\n"
        "=== Example ===\n"
@@ -186,23 +189,26 @@ cmd_des_t const cmd_des_pin_val={
 /** Command descriptor for pin get/set direction */
 cmd_des_t const cmd_des_pin_dir={
        0, CDESM_OPCHR|CDESM_RW,
-       "pindir*","Sets pin direction 1-out, 0-in",
+       "pindir*","Sets pin direction 1-out, 0-in.",
        "=== Description ===\n"
        "\n"
-       "This command is used as setter and getter of selected pins direction.\n"
-       "Command expects suffix, which specifies the name of the pin. Than\n"
-       "operation character : (setter) or ? (getter) and if setter, last\n"
-       "parameter specifies value to be assigned. 1 means output, 0 means\n"
-       "input.\n"
+       "This command is used as setter and getter of selected pins direction. Command\n"
+       "expects first parameter, operation character and eventually second parameter\n"
+       "The first parameter specifies name of the pin, operation\n"
+       "character : (setter) or ? (getter) and if setter, last parameter\n"
+       "specifies direction to be assigned to the pin.\n"
        "\n"
        "Pin name can be obtained by pinlist command.\n"
        "\n"
+       "Most of the pins are accessible indirectly via highlevel commands\n"
+       "HBR_EN is for example controlled by hbrenable command. This command\n"
+       "serves as supplement to highlevel commands for testing purpose.\n"
        "=== Command syntax ===\n"
        "\n"
        "   --> pinvdirNAME[:|?][DIR]\n"
        "where\n"
        "* NAME is a string\n"
-       "* : means assign DIR to pi NAME and ? means get direction from pin NAME\n"
+       "* : means assign DIR to pin NAME and ? means get direction from pin NAME\n"
        "* DIR can be 0 or 1\n"
        "\n"
        "=== Example ===\n"
index 7b13388315544cb3d742b3765b49e59837edecb9..8857c0efc5b83b0fa02d334b5967b8d92067d05b 100644 (file)
@@ -53,9 +53,6 @@ int cmd_do_port_list(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /**
  * @brief      Read values from specified port
  *
- * Command syntax:  portvalNAME:(val)  - Set value val to port specified by NAME (can be obtsined by portlist command). 1st bit -> PORT_PIN_1, 2nd bit -> PORT_PIN_2)
- *                                     portvalNAME?    - Get value on port specified by NAME (can be obtsined by portlist command). 1st bit -> PORT_PIN_1, 2nd bit -> PORT_PIN_2)
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -99,17 +96,17 @@ int cmd_do_port_val(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /** Command descriptor for read values from port command */
 cmd_des_t const cmd_des_port_val={
     0, CDESM_OPCHR|CDESM_RW,
-    "portval*","Read or set values from port",
+    "portval*","Read/write values from/to port.",
     "=== Description ===\n"
     "\n"
-    "This command set or get values of all pins on specified port. First\n"
+    "This command sets or gets values of all pins on specified port. First\n"
     "parameter specifies a name of the port, than operation character :\n"
-    "(setter) or ? (getter) and if setter, then another hexadecimal number\n"
-    "specifies the value assigned to the pins. First bit is assigned to the\n"
-    "first pin, second bit is assigned to the second pin, etc.\n"
+    "(setter) or ? (getter) is expected and if setter, then another\n"
+    "hexadecimal number specifies the value assigned to the pins. First\n"
+    "bit is assigned to the first pin, second bit is assigned to the second\n"
+    "pin, etc.\n"
     "\n"
-    "Port names will be available in portlist command, witch is not yet\n"
-    "ready.\n"
+    "Port names are available via portlist command.\n"
     "\n"
     "=== Command syntax ===\n"
     "\n"
@@ -137,8 +134,15 @@ cmd_des_t const cmd_des_port_val={
 /** Command descriptor for port list printout */
 cmd_des_t const cmd_des_port_list={
     0, 0,
-    "portlist","Print list of port names",
-    "\n",
+    "portlist","Print list of port names.",
+    "=== Description ===\n"
+    "\n"
+    "This command prints list of all defined ports accessible via\n"
+    "portval command.\n"
+    "\n"
+    "=== Command syntax ===\n"
+    "\n"
+    "   --> portlist\n",
     CMD_HANDLER(cmd_do_port_list), (void *)&cmd_list_port
 };
 
index 805febb51ed5ae0890bb563c5770a80876189c15..e9871711122f7d3a2208daffe2c66f7f816abab8 100644 (file)
@@ -176,8 +176,6 @@ void test_sdr()
 /**
  * @brief Start SDR test routine
  *
- * Command syntax: testslog
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -191,8 +189,6 @@ int cmd_do_test_log(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /**
  * @brief      Tests the capacity and fitness of connected SDRAM
  *
- * Command syntax: testsdram
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -241,10 +237,10 @@ int cmd_do_test_ram(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /** Command descriptor for test SDRAM */
 cmd_des_t const cmd_des_test_sdram={
     0, 0,
-    "testsdram","Test if SDRAM module is connected and if it is, measure capacity",
+    "testsdram","Test if SDRAM module is connected and if it is, measure capacity.",
     "=== Description ===\n"
     "\n"
-    "This command tests while SDRAM address space by writing and reading a\n"
+    "This command tests SDRAM address space by writing and reading a\n"
     "pattern. It detects valid SDRAM capacity.\n"
     "\n"
     "=== Command syntax ===\n"
@@ -257,7 +253,14 @@ cmd_des_t const cmd_des_test_sdram={
 cmd_des_t const cmd_des_test_log={
     0, 0,
     "testlog","Open command subprocessor for managing SDRAM logging.",
-    "\n",
+    "=== Description ===\n"
+     "\n"
+     "Command opens subcommand processor, which contains testing commands\n"
+    "for logging into SDRAM\n"
+    "\n"
+    "=== Command syntax ===\n"
+    "\n"
+    "   --> testlog\n",
     CMD_HANDLER(cmd_do_test_log), (void *)&cmd_list_sdram
 };
 
index a4a7efdd8c78dd16c5b6c2df4344f6398066ad55..61e4229e8da8ef579c66c1eef87162d16c8cf50a 100644 (file)
 /**
  *     @brief  Translate SPI response according the command and peripheral type
  *
- *     Command syntax: spitrNAME?(cmd, resp)
- *
- *     Command take response resp given by last command cmd and translate it according peripheral
- *     type specified by NAME.
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -144,8 +139,6 @@ int spimst_print_rx(struct spi_drv *ifc, int status, int addr, uint8_t *buf)
 /**
  *     @brief  Send SPI command on SPI and receive response
  *
- *     Command syntax: spimst##:ADDR(cmd) - Sends command cmd on SPI ## with address ADDR
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -200,18 +193,18 @@ int cmd_do_spimst(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /** Command descriptor for SPI response translation */
 cmd_des_t const cmd_des_spi_translate={
        0, CDESM_OPCHR|CDESM_RW,
-       "spitr*","Translate response from SPI peripheral. spitrPERNAME?(CMD, RESP)",
+       "spitr*","Translate response from SPI peripheral.",
        "=== Description ===\n"
        "\n"
        "This command can translate response from SPI from many different\n"
        "peripherals into human readable form. Standard SPI response is in form\n"
        "of few bytes, which are encoding the information. This commands takes\n"
        "this response, last command which evoked this response, name of the\n"
-       "peripheral and translates the response in text form.\n"
+       "peripheral and translates the response to the form of atribute-value table.\n"
        "\n"
        "Command takes first parameter, which is the peripheral name, then it\n"
        "expects ? operation character and another two parameters. The first\n"
-       "one is command and the second is response for the command.\n"
+       "one is command and the second one is response for that command.\n"
        "\n"
        "=== Command syntax ===\n"
        "\n"
@@ -233,7 +226,7 @@ cmd_des_t const cmd_des_spi_translate={
 /** Command descriptor for SPI trasfer */
 cmd_des_t const cmd_des_spimst = {
        0, CDESM_OPCHR,
-       "spimst#", "SPI master communication request",
+       "spimst#", "SPI master communication request.",
        "=== Description ===\n"
        "\n"
        "This is master SPI transfer command. Command expects SPI number as a\n"
index 58dcfed2b24c74d4ec37f734aabd671afbea4899..ee005b7f8cee4dac3c594c3bdaf7dd1bdb24da4e 100644 (file)
@@ -83,8 +83,6 @@ int vbat1_pwm() {
 /**
  * @brief      Power on VBAT and VBAT1 using PWM
  *
- * Command syntax: poweron
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -101,8 +99,6 @@ int cmd_do_power_on(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /**
  * @brief      Power off VBAT and VBAT1 using PWM
  *
- * Command syntax: poweroff
- *
  * @param[in]  cmd_io  Pointer to IO stack
  * @param[in]  des             Pointer to command descriptor
  * @param[in]  param   Parameters of command
@@ -122,17 +118,17 @@ int cmd_do_power_off(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
 /** Command descriptor for poweron */
 cmd_des_t const cmd_des_power_on = {
     0, 0,
-    "poweron","Set VBATEN and VBAT1EN using PWM",
+    "poweron","Set VBATEN and VBAT1EN using PWM.",
     "=== Description ===\n"
     "\n"
     "This command turns on a VBAT and slowly charge capacitors VBAT1 using\n"
     "PWM with scalable timing.\n"
     "\n"
-    "Poweron command have to be launched befor any access to any SPI\n"
-    "peripherals. If not, they will not work.\n"
+    "Poweron command have to be launched before any access to any SPI\n"
+    "peripherals, otherwise they will not work.\n"
     "\n"
     "Please note that parameters for this PWM may change from device to\n"
-    "device and it might be nescessary to tune them for each device.\n"
+    "device and it might be necessary to tune them for each device.\n"
     "\n"
     "=== Command syntax ===\n"
     "\n"
@@ -143,7 +139,7 @@ cmd_des_t const cmd_des_power_on = {
 /** Command descriptor for poweroff */
 cmd_des_t const cmd_des_power_off = {
     0, 0,
-    "poweroff","Clear VBATEN and VBAT1EN",
+    "poweroff","Clear VBATEN and VBAT1EN.",
     "=== Description ===\n"
     "\n"
     "This command turns off VBAT and VBAT1.\n"