summaryrefslogtreecommitdiffstats
path: root/src/serial.c
Commit message (Collapse)AuthorAgeFilesLines
* cosmetic: clarify c_iflag in osmo_serial_init()Harald Welte2019-09-281-1/+1
| | | | | | | We first set the ISTRIP bit only to remove it in the next line. Let's try to avoid confusing the reader. Change-Id: Icba43dd4b6dc4f9c7f8fcf91d24b3baac4e0c74a
* Fix/Update copyright notices; Add SPDX annotationHarald Welte2017-11-131-0/+2
| | | | | | | | Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
* serial.c: Use pragma message instead of warningPau Espin Pedrol2017-06-231-1/+1
| | | | Change-Id: I65b1ef6e4b9ba0bf0c3c2f03311250f31ddb308a
* doxygen: unify use of \file across the boardNeels Hofmeyr2017-06-231-7/+4
| | | | | | | | | | | | | | | | | Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
* doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr2017-06-231-5/+5
| | | | | | | | | | Especially for short descriptions, it is annoying to have to type \brief for every single API doc. Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes the first sentence of an API doc as the brief description. Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
* update/extend doxygen documentationHarald Welte2017-06-121-3/+2
| | | | | | | | | It's a pity that even with this patch we still are fare away from having the whole API documented. However, at least we have a more solid foundation. Updates not only extend the documentation, but also make sure it is rendered properly in the doxygen HTML. Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
* serial.c: file descriptor '0' is a valid valueHarald Welte2016-12-241-2/+2
| | | | | | | if stdin/stdout/stderr are all closed by our environment, it may very well be that opening a serial port returns fd == 0. Change-Id: Ifd9670260883a35da0629369e0d49e467d5b4d72
* serial.c: Fix fd leak in case of fcntl() error pathsHarald Welte2016-12-241-2/+4
| | | | | Change-Id: I14f934957e1086b803f3a7b9b5e6d602380f0be2 Fixes: Coverity CID 158987
* serial.c: Some ports don't support TIOCMBIS for RTS/CTS controlHarald Welte2016-12-231-2/+2
| | | | | | So let's ignore the error we might get from this opreration. Change-Id: I69dad90403355b6512c3bf4c7fd10dd1dd985f01
* serial: Open devie in non-blocking mode and then switch to blockingHarald Welte2016-12-231-3/+17
| | | | | | | | There are some serial ports that apparently block during the open in some circumstances. We don't want that. We want to either open it immediately, or fail fast. Change-Id: I626b138574bc50f4f4b09c4d609f3623ff512dff
* misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi2013-02-151-1/+1
| | | | | Doxygen generates quite a lot of warnings on libosmocore. Some of them are obvious typos - this patch aims to fix such low-hanging fruit.
* serial: don't set O_NDELAY, as it is more or less O_NONBLOCKHarald Welte2012-08-031-1/+1
| | | | | Applications like osmocon will set O_NONBLOCK themselves or have it done indirectly by registering it with libosmocore/select.c code.
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-181-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/serial: Fix warning when on platform other than linuxSylvain Munaut2011-11-201-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/serial: Fix typoSylvain Munaut2011-09-281-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/serial: support custom baud rates on OS XSylvain Munaut2011-09-281-2/+22
| | | | | | Thanks to Richard James <xyzzy@mm.st> for the patch Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/serial: Add utilities to deal with serial portsSylvain Munaut2011-09-021-0/+209
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>