mirror of
https://github.com/scratchfoundation/Scratch_1.4.git
synced 2024-12-01 03:36:50 -05:00
display /dev/ttyACM0, /dev/ttyS* and /dev/rfcomm* serial ports
add possibility to communicate with arduino boards that apeears as ttyACM* on linux, witha boards connected via bluetooth (rfcomm* on linux) and with boards connected via rs232 (ttyS*).
This commit is contained in:
parent
1f57d2fd5b
commit
01d2598f32
1 changed files with 4 additions and 1 deletions
|
@ -337,7 +337,10 @@ error:
|
||||||
}
|
}
|
||||||
|
|
||||||
int isSerialPortDev(char *s) {
|
int isSerialPortDev(char *s) {
|
||||||
return isPrefix("ttyusb", s);
|
return isPrefix("ttyusb", s) ||
|
||||||
|
isPrefix("ttys", s) ||
|
||||||
|
isPrefix("ttyacm", s) ||
|
||||||
|
isPrefix("rfcomm", s);
|
||||||
}
|
}
|
||||||
|
|
||||||
int isPrefix(char *prefix, char *s) {
|
int isPrefix(char *prefix, char *s) {
|
||||||
|
|
Loading…
Reference in a new issue