in BusTools/SpiTestTool/main.cpp [274:314]
void PrintUsage (PCWSTR name)
{
wprintf(
L"SpiTestTool: Command line SPI testing utility\n"
L"Usage: %s [-list] [-n FriendlyName] [-c ChipSelectLine] [-m Mode] "
L"[-d DataBitLength] [-f ClockFrequency]\n"
L"\n"
L" -list List available SPI controllers and exit.\n"
L" FriendlyName The friendly name of the SPI controller over which\n"
L" you wish to communicate. This parameter is\n"
L" optional and defaults to the first enumerated SPI\n"
L" controller.\n"
L" ChipSelectLine The chip select line to use. This parameter is\n"
L" optional and defaults to 0.\n"
L" Mode The SPI mode to use (0-3). This parameter is\n"
L" optional and defaults to Mode 0.\n"
L" DataBitLength The data bit length to use. This parameter is optional\n"
L" and defaults to 8.\n"
L" ClockFrequency The SPI clock frequency to use. This parameter is\n"
L" optional and defaults to 4Mhz.\n"
L"\n"
L"Examples:\n"
L" Connect to the first SPI controller found with default settings\n"
L" (ChipSelectLine=0, Mode=0, DataBitLength=8, Frequency=4Mhz):\n"
L" %s\n"
L"\n"
L" List available SPI controllers and exit:\n"
L" %s -list\n"
L"\n"
L" Connect to SPI1 in mode 2, with default speed (4Mhz) and chip\n"
L" select line (0):\n"
L" %s -n SPI1 -m 2\n"
L"\n"
L" Connect to chip select 1 on SPI1 in mode 2 at 1Mhz:\n"
L" %s -c 1 -n SPI1 -m 2 -f 1000000\n",
name,
name,
name,
name,
name);
}