Commit Graph

10 Commits

Author SHA1 Message Date
Harald Welte 7711713b7a sercomm: More API documentation
Change-Id: I5d5002ceedd10e10d772693478f4f9cab6b1290a
2017-05-17 15:15:09 +01:00
Harald Welte 799bef5cf6 sercomm: Better integration of driver interface
We cannot assume a certain UART API like uart_baudrate() which only
exists in OsmocomBB.  Rather, use generic function prototypes
(sercomm_drv_*) which are to be provided by the application /
environment to the sercomm core.

Change-Id: I01ea3067baf1791000c1a7d537ccce496a1ab1ee
2017-05-17 15:15:09 +01:00
Harald Welte 7af6d22a4e sercomm: Include in libosmocore Makefile
Change-Id: If9d50d634381f43b2c67b97fea36a462a66e4559
2017-05-17 15:15:09 +01:00
Harald Welte 1d640889df sercomm: remove unrequired helper functions
osmo_sercomm_{bind,get}_uart() are not really needed anymore, as
sercomm_inst is public and thus the user can access the uart_id member
directly.

Change-Id: I6d57709c3764036046202f16a26c9eb87426c8d1
2017-05-17 15:15:09 +01:00
Harald Welte 8a4eb837ab sercomm: Move HDLC related defines into C file
Those values are not relevant to the sercomm user, only to the
implementation and thus can remain inside sercomm.c

Change-Id: I5700a45985b7c119c6338932171aae62ee4e2d22
2017-05-17 15:15:09 +01:00
Harald Welte ea3d3ba595 sercomm: Add doxygen-style documentation to public API
Change-Id: I2d8b11905692920d328262836420f01305be489e
2017-05-17 15:15:09 +01:00
Harald Welte f6adcd7dd6 sercomm: make rx msg size configurable per instance
Change-Id: I835506e26e83232e1e7290c0da04d389c8d7fb40
2017-05-17 10:46:40 +00:00
Harald Welte 1358836282 sercomm: introduce osmo_ naming prefix in struct and function names
Change-Id: If4e22f182a47b72b1fe43146716a4fbccceb62e6
2017-05-17 10:46:40 +00:00
Harald Welte cc95f4b06d sercomm: Enable multiple instances of 'sercomm'
Rather than having one global instance, let's permit multiple instances
of sercomm to co-exist, with all API functions extended by the instance
as first argument.

Change-Id: I0f3b53f464b119d65747bcb0be0af2d631e1cc05
2017-05-17 10:46:39 +00:00
Harald Welte c68af6a64b Import sercomm.c from osmocom-bb
This imports the file src/target/firmware/comm/sercomm.c from
osmocom-bb.git without introducing any modifications.  It will not even
be built yet, as Makefile integration is intentionally left until it has
been adapted to work inside libosmocore.

Change-Id: I9ee199381c7b5986a9540d124836cdddd0f66c86
2017-05-17 10:46:39 +00:00