aboutsummaryrefslogtreecommitdiffstats
path: root/src/serial.c
AgeCommit message (Collapse)AuthorFilesLines
2023-01-18Move src/*.{c,h} to src/core/Pau Espin Pedrol1-279/+0
This way we have all libosmocore.so in an own subdir instead of having lots of files in the parent dir, which also contains subdirs to other libraries. This also matches the schema under include/osmocom/. Change-Id: I6c76fafebdd5e961aed88bbecd2c16bc69d580e2
2021-12-14treewide: remove FSF addressOliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I5050285e75cf120407a1d883e99b3c4bcae8ffd7
2020-11-13serial: Introduce API osmo_serial_speed_tPau Espin Pedrol1-0/+35
This allows usual integer parsing at app level and calling this function to make sure correct values will be passed to osmo_serial_set_baudrate(). Change-Id: I41415c99d26128b33a8bf5ef7b38948bd1fe5d50
2020-11-13serial: Log error if tcgetattr() or tcsetattr() failPau Espin Pedrol1-4/+9
Change-Id: I79121e016f045c9d0555881359cd3008320223ed
2020-11-13serial: Fix typo in debug log linePau Espin Pedrol1-1/+1
Change-Id: Ibfe70a42649512719be3c3ae42b5fad8b28a800a
2020-11-13cosmetic: serial: Fix typo in commentPau Espin Pedrol1-1/+1
Change-Id: I5d4901e01af477ebb815f70a5326ada6224c4be8
2019-09-28cosmetic: clarify c_iflag in osmo_serial_init()Harald Welte1-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
2017-11-13Fix/Update copyright notices; Add SPDX annotationHarald Welte1-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
2017-06-23serial.c: Use pragma message instead of warningPau Espin Pedrol1-1/+1
Change-Id: I65b1ef6e4b9ba0bf0c3c2f03311250f31ddb308a
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr1-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
2017-06-23doxygen: enable AUTOBRIEF, drop \briefNeels Hofmeyr1-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
2017-06-12update/extend doxygen documentationHarald Welte1-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
2016-12-24serial.c: file descriptor '0' is a valid valueHarald Welte1-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
2016-12-24serial.c: Fix fd leak in case of fcntl() error pathsHarald Welte1-2/+4
Change-Id: I14f934957e1086b803f3a7b9b5e6d602380f0be2 Fixes: Coverity CID 158987
2016-12-23serial.c: Some ports don't support TIOCMBIS for RTS/CTS controlHarald Welte1-2/+2
So let's ignore the error we might get from this opreration. Change-Id: I69dad90403355b6512c3bf4c7fd10dd1dd985f01
2016-12-23serial: Open devie in non-blocking mode and then switch to blockingHarald Welte1-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
2013-02-15misc: Doxygen tweaks: fixed some typos and minor errorsKaterina Barone-Adesi1-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.
2012-08-03serial: don't set O_NDELAY, as it is more or less O_NONBLOCKHarald Welte1-1/+1
Applications like osmocon will set O_NONBLOCK themselves or have it done indirectly by registering it with libosmocore/select.c code.
2012-04-18doc: Fix the Doxygen section endingsSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-20core/serial: Fix warning when on platform other than linuxSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-28core/serial: Fix typoSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-28core/serial: support custom baud rates on OS XSylvain Munaut1-2/+22
Thanks to Richard James <xyzzy@mm.st> for the patch Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-02core/serial: Add utilities to deal with serial portsSylvain Munaut1-0/+209
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>