spi
git-svn-id: svn://db.shs.com.ru/pip@571 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
3
main.cpp
3
main.cpp
@@ -8,10 +8,11 @@ int main(int argc, char *argv[]) {
|
||||
cli.addArgument("dev", true);
|
||||
cli.addArgument("speed", true);
|
||||
if (!cli.hasArgument("dev")) {
|
||||
piCout << "no device";
|
||||
return 0;
|
||||
}
|
||||
PIString path = cli.argumentValue("dev");
|
||||
PISPI spi(path);
|
||||
PISPI spi(path, 1000000);
|
||||
if (cli.hasArgument("speed")) spi.setSpeed(cli.argumentValue("speed").toInt());
|
||||
piCout << "open" << spi.open();
|
||||
piCout << "write" << spi.write(PIByteArray::fromHex("0000000000000000000000000000000000000000000000000000000000000000"));
|
||||
|
||||
Reference in New Issue
Block a user