/*
- * Copyright (C) 2012-2013 Czech Technical University in Prague
+ * Copyright (C) 2012-2013, 2016 Czech Technical University in Prague
*
* Created on: 28.2.2013
*
"dinsetup*", "Setup DIN pin parameters (Pull up/down, tristate/active, IRQ and wakeup disable/enable)",
"### Command syntax ###\n"
"\n"
- " dinsetup<PINS> [A [B [C]]]\n"
+ " dinsetup<PINS> [PU [ACT [WAKE]]]\n"
"where\n"
"\n"
- "- PINS is either a number in range 1-16 or a range written as `<min>-<max>`\n"
- "- A is an optional value - either 0 (pull down/switch to battery) or 1 (pull up/switch to ground). The default is 1.\n"
- "- B is an optional value - either 0 (tri-state) or 1 (active). The default is 0.\n"
- "- C is an optional value - either 0 (wake up and IRQ disabled) or 1 (wake up and IRQ disabled enabled). The default is 1.\n"
+ "- PINS is either a number in range 0-15 or a range written as\n"
+ " `<min>-<max>`\n"
+ "- PU is an optional value - either 0 (pull down/switch to battery) or 1\n"
+ " (pull up/switch to ground). The default is 1.\n"
+ "- ACT is an optional value - either 0 (tri-state) or 1 (active). The\n"
+ " default is 0.\n"
+ "- WAKE is an optional value - either 0 (wake up and IRQ disabled) or 1\n"
+ " (wake up and IRQ enabled). The default is 1.\n"
"\n"
"### Description ###\n"
"\n"
"The command setups properties of one or more DIN pins as specified by\n"
- "`<PIN>`. Pins 0-7 can be set as pull up (switch to ground) or pull down\n"
- "(switch to battery), pins 8-15 are hardcoded as switch to ground. All\n"
- "pins can be set to either tri-state or active state and also can have\n"
+ "`<PINS>`. Pins 0-7 can be set as pull up (switch to ground) or pull\n"
+ "down (switch to battery), pins 8-15 are hardcoded as switch to ground.\n"
+ "All pins can be set to either tri-state or active state and can have\n"
"wake-up function with IRQ activated or not.\n"
"\n"
- "The command always prints the final settings of each set pin as ABC.\n"
- "The actual configuration cannot be read out of the pin driver.\n"
+ "The command always prints the final settings of each set pin as PU ACT\n"
+ "WAKE (without spaces). The actual configuration cannot be read out of\n"
+ "the pin driver.\n"
"\n"
"### Example ###\n"
"\n"
" --> dinsetup1 1 0 0\n"
" dinsetup1=100\n"
"\n"
- "Sets the DIN1 as switch to ground, active and disables IRQ generation.\n"
+ "Sets the DIN1 as switch to ground, tri-state and disables IRQ\n"
+ "generation.\n"
"\n"
" --> dinsetup2\n"
" dinsetup2=101\n"
"\n"
- "Sets the DIN2 as to the default values i.e. switch to battery,\n"
+ "Sets the DIN2 as to the default values i.e. switch to ground,\n"
"tri-state, wake-up/IRQ enabled.\n"
"\n"
" --> dinsetup0-7 1 1 1\n"
" dinsetup6=111\n"
" dinsetup7=111\n"
"\n"
- "Sets the DIN0 through DIN7 as switch to ground, tri-state, wake-up/IRQ\n"
+ "Sets the DIN0 through DIN7 as switch to battery, active, wake-up/IRQ\n"
"enabled.\n",
CMD_HANDLER(cmd_do_din_setup), (void *)&cmd_list_din
};