+ send_button

This commit is contained in:
tth committed 2021-07-20 11:24:27 +02:00
1 parent 47e6f7a690
commit 030472e7d9
4 files changed
+32 -2

No files matched your search

+25
View File
@@ -97,3 +97,28 @@ return 0;
}
/* ---------------------------------------------------------------- */
/*
* comment gerer le up/down des boutons ?
*/
int send_button(int number, int state)
{
char message[100];
if (fdtx < 0) {
fprintf(stderr, "%s: fdtx not initialized !\n", __func__);
exit(1);
}
if (number<0 || number>16) {
return -1;
}
sprintf(message, "T%01x%1x", number, state);
fprintf(stderr, "%s ----> '%s'\n", __func__, message);
return -1;
}
/* ---------------------------------------------------------------- */