Commit graph

47 commits

Author SHA1 Message Date
Antoine Rousseau
4bbbf25b12 on Linux and Mac, allow to lock the device with flock(), if it's already locked elsewhere then close it 2024-10-09 12:48:15 +02:00
Antoine Rousseau
e85a17be38 USB filter for Windows 2024-10-08 14:23:39 +02:00
Antoine Rousseau
14915d317c allow to filter only USB devices when querying ports or devices, for mac and linux 2024-10-08 13:24:34 +02:00
Antoine Rousseau
8b170f3d35 refactor comport_ports() and comport_devices() to common comport_enum() 2024-10-07 18:33:25 +02:00
Antoine Rousseau
28f47d7dfc remove erroneous comment 2024-09-27 15:54:09 +02:00
Antoine Rousseau
e3a41b4a0c fix verbose printing of baud rate 2024-09-27 15:51:12 +02:00
Antoine Rousseau
6b6a9403de make sure to disable verbose for the initial 'test' comport 2024-09-27 15:35:33 +02:00
Antoine Rousseau
7da80496dd remove unnecessary defines 2024-09-27 15:26:35 +02:00
IOhannes m zmölnig
aae4d09a12 use 'else' clauses for discussing various OSs 2024-09-26 17:04:57 +02:00
IOhannes m zmölnig
321e36aef3 different printout when setting stobbits for windows and the rest 2024-09-26 17:04:29 +02:00
IOhannes m zmölnig
dc01895dca prevent out-of-bounds copy 2024-09-26 16:52:07 +02:00
IOhannes m zmölnig
b66214e6a8 negative port-numbers at creation time indicate not-to-open
Closes: https://git.iem.at/pd/comport/-/issues/5
2024-09-26 16:48:32 +02:00
IOhannes m zmölnig
53f49d7004 extend valid baudrates
also use a single table for baudrates and baudspeedbits,
so it's easier to update

Closes: https://git.iem.at/pd/comport/-/issues/8
2024-09-26 16:42:14 +02:00
IOhannes m zmölnig
56df49f8a5 PD -> Pd 2024-09-26 16:10:50 +02:00
IOhannes m zmölnig
dab840e0ac Use 'logpost() rather than the deprecated 'verbose()' 2024-09-26 16:10:19 +02:00
IOhannes m zmölnig
a82f18ad59 store pretty device-name
rather than cluttering the code with '#ifdef _WIN32'
2024-09-26 16:07:17 +02:00
IOhannes m zmölnig
df6a82e4cd hrmpf: on macOS speed_t is "long", on linux it is "int"...
let's use "long" for now...
2022-03-21 11:31:25 +01:00
IOhannes m zmölnig
3eb008b6d8 functions need to return values 2022-03-21 11:26:41 +01:00
IOhannes m zmölnig
9e46ba1c45 windows errors are "long unsigned int" 2022-03-21 11:12:29 +01:00
IOhannes m zmölnig
4f891c5ec1 drop unused variable (and fix wrong use) 2022-03-21 11:07:35 +01:00
IOhannes m zmölnig
5f1f1ef3e1 Allow to specify the serial_device_prefix as the first arg to [comport]
this probably makes patches non-cross-platform.

Closes: https://git.iem.at/pd/comport/-/issues/1
2022-03-21 11:05:17 +01:00
IOhannes m zmölnig
e093e5c1f7 use MAXPDSTRING for size of serial_device_prefix 2022-03-21 10:57:58 +01:00
IOhannes m zmölnig
7cfa0d75c6 drop commented ifdefs 2022-03-21 10:53:01 +01:00
IOhannes m zmölnig
b0eea92472 bump copyright boilerplate 2022-03-21 10:36:19 +01:00
IOhannes m zmölnig
c1c26bc89d bump changes 2022-03-21 10:35:30 +01:00
IOhannes m zmölnig
620021f0f5 alignment 2022-03-21 10:27:19 +01:00
IOhannes m zmölnig
d0fafb8e55 allow the user to re-enable input processing
just in case somebody needs the old behaviour
2022-03-21 10:27:06 +01:00
IOhannes m zmölnig
a679b2d459 rename x->verbose to x->x_verbose
it's really a Pd-specific member (as opposed to comport-specific)
2022-03-21 10:17:27 +01:00
IOhannes m zmölnig
9a390dd34d document x->verbose 2022-03-21 10:15:56 +01:00
IOhannes m zmölnig
38ceccda20 set_hupcl() is always implemented, so n oneed to #ifdef its invocation 2022-03-21 10:15:47 +01:00
IOhannes m zmölnig
cb4ccec942 use (t_bool) for boolean values 2022-03-21 10:15:21 +01:00
IOhannes m zmölnig
c1f00275dd use (int) for x->rxerrors 2022-03-21 10:10:13 +01:00
IOhannes m zmölnig
7cea55b373 use (int) for parity_bits 2022-03-21 10:09:09 +01:00
IOhannes m zmölnig
178bb339bf rename variables
so we have raw and cooked values separately
2022-03-21 10:07:32 +01:00
IOhannes m zmölnig
25186d308c use (int) for data_bits 2022-03-21 09:58:03 +01:00
IOhannes m zmölnig
561172f3f6 use "int" for baudrate
rather than both float and t_float (and use pointercasets...)
2022-03-21 09:53:56 +01:00
IOhannes m zmölnig
fb54e0fac8 re-grouped members for better readability 2022-03-21 09:43:42 +01:00
IOhannes m zmölnig
7db31d1ae4 whitespace 2022-03-21 09:40:46 +01:00
IOhannes m zmölnig
36cff9839a drop unused members 2022-03-21 09:39:52 +01:00
IOhannes m zmölnig
4fcbc3dcb1 Merge remote-tracking branch 'ressi/input-fix' 2022-03-21 09:30:22 +01:00
IOhannes m zmölnig
3c460d2b46 squelch unused-parameter warnings 2022-03-21 09:08:29 +01:00
IOhannes m zmölnig
ebd8348497 use pd_error() instead of error() 2022-03-21 09:03:24 +01:00
IOhannes m zmölnig
0fe7f81a66 fix spelling errors 2022-03-21 09:00:03 +01:00
Christof Ressi
3aef7dadd5 disable input processing to prevent CR -> NL substitution 2021-11-06 22:26:17 +01:00
Roman Haefeli
49cefffbb7 make fixes by mrpeach work also when compiling with mingw 2017-03-08 09:47:22 +01:00
IOhannes m zmölnig
c8e6d783bc fixed indentation 2017-02-27 23:06:42 +01:00
IOhannes m zmölnig
4b196cd642 moved comprt-code to toplevel directory
keep [bird] in subdirectory; it's just a legacy project using [comport]
2017-02-27 11:14:59 +01:00
Renamed from comport/comport.c (Browse further)