Projects
osmocom:master
libosmocore
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 271
View file
libosmocore.spec
Changed
@@ -14,13 +14,13 @@ Name: libosmocore Requires: osmocom-master -Version: 1.9.0.68.846118 +Version: 1.9.0.71.8116 Release: 0 Summary: The Open Source Mobile Communications Core Library License: GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later Group: Productivity/Telephony/Utilities Url: https://osmocom.org/projects/libosmocore/wiki/Libosmocore -Source: libosmocore_1.9.0.68.846118.tar.xz +Source: libosmocore_1.9.0.71.8116.tar.xz Source1: rpmlintrc BuildRequires: automake >= 1.6 BuildRequires: libtool >= 2
View file
commit_811638c00539152bb445ee15ddd2f85c3d1bf12f.txt
Added
View file
commit_84611881c9285915724da4933edeb4b0dcd1bb1d.txt
Deleted
View file
libosmocore_1.9.0.68.846118.dsc -> libosmocore_1.9.0.71.8116.dsc
Changed
@@ -2,7 +2,7 @@ Source: libosmocore Binary: libosmocore, libosmocodec4, libosmocodec-doc, libosmocoding0, libosmocoding-doc, libosmocore21, libosmocore-doc, libosmogb14, libosmogb-doc, libosmogsm20, libosmogsm-doc, libosmoisdn0, libosmoisdn-doc, libosmovty13, libosmovty-doc, libosmoctrl0, libosmoctrl-doc, libosmosim2, libosmosim-doc, libosmousb0, libosmousb-doc, libosmocore-dev, libosmocore-utils, libosmocore-dbg Architecture: any all -Version: 1.9.0.68.846118 +Version: 1.9.0.71.8116 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/libosmocore Standards-Version: 3.9.8 @@ -35,8 +35,8 @@ libosmovty-doc deb doc optional arch=all libosmovty13 deb libs optional arch=any Checksums-Sha1: - d2a15a5887252b0b6c63907ab3defc31b60f3f00 1085248 libosmocore_1.9.0.68.846118.tar.xz + a0dbd6af6f597e956fa8b68107f53099e649c48c 1085052 libosmocore_1.9.0.71.8116.tar.xz Checksums-Sha256: - f97f025e2b2a1c545e36634f5432d54641390cf28b2798529dda6d9804f23099 1085248 libosmocore_1.9.0.68.846118.tar.xz + 137f59de3dcdf22307093ae9d596af1392bdb0331972af84a318559bed5c40ba 1085052 libosmocore_1.9.0.71.8116.tar.xz Files: - 138f5ad9517edc0c8ac8c1b7794f088c 1085248 libosmocore_1.9.0.68.846118.tar.xz + 05aed56fa7648170b3d1527da93d4e42 1085052 libosmocore_1.9.0.71.8116.tar.xz
View file
libosmocore_1.9.0.68.846118.tar.xz/.tarball-version -> libosmocore_1.9.0.71.8116.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.9.0.68-846118 +1.9.0.71-8116
View file
libosmocore_1.9.0.68.846118.tar.xz/debian/changelog -> libosmocore_1.9.0.71.8116.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -libosmocore (1.9.0.68.846118) unstable; urgency=medium +libosmocore (1.9.0.71.8116) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Sun, 03 Dec 2023 02:18:19 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Sun, 03 Dec 2023 02:22:08 +0000 libosmocore (1.9.0) unstable; urgency=medium
View file
libosmocore_1.9.0.68.846118.tar.xz/include/osmocom/core/soft_uart.h -> libosmocore_1.9.0.71.8116.tar.xz/include/osmocom/core/soft_uart.h
Changed
@@ -87,6 +87,10 @@ const struct osmo_soft_uart_cfg *cfg); void osmo_soft_uart_free(struct osmo_soft_uart *suart); int osmo_soft_uart_configure(struct osmo_soft_uart *suart, const struct osmo_soft_uart_cfg *cfg); + +const char *osmo_soft_uart_get_name(const struct osmo_soft_uart *suart); +void osmo_soft_uart_set_name(struct osmo_soft_uart *suart, const char *name); + int osmo_soft_uart_set_rx(struct osmo_soft_uart *suart, bool enable); int osmo_soft_uart_set_tx(struct osmo_soft_uart *suart, bool enable);
View file
libosmocore_1.9.0.68.846118.tar.xz/src/core/libosmocore.map -> libosmocore_1.9.0.71.8116.tar.xz/src/core/libosmocore.map
Changed
@@ -444,6 +444,8 @@ osmo_soft_uart_alloc; osmo_soft_uart_free; osmo_soft_uart_configure; +osmo_soft_uart_get_name; +osmo_soft_uart_set_name; osmo_soft_uart_set_rx; osmo_soft_uart_set_tx; osmo_soft_uart_rx_ubits;
View file
libosmocore_1.9.0.68.846118.tar.xz/src/core/soft_uart.c -> libosmocore_1.9.0.71.8116.tar.xz/src/core/soft_uart.c
Changed
@@ -111,9 +111,6 @@ /* receive a single bit */ static inline void osmo_uart_rx_bit(struct osmo_soft_uart *suart, const ubit_t bit) { - if (!suart->rx.running) - return; - switch (suart->rx.flow_state) { case SUART_FLOW_ST_IDLE: if (bit == 0) { /* start bit condition */ @@ -196,9 +193,12 @@ * \paramin suart soft-UART instance to feed bits into. * \paramin ubits pointer to the unpacked bits. * \paramin n_ubits number of unpacked bits to be fed. - * \returns 0 on success; negative on error. */ + * \returns 0 on success; negative on error. + * -EAGAIN indicates that the receiver is disabled. */ int osmo_soft_uart_rx_ubits(struct osmo_soft_uart *suart, const ubit_t *ubits, size_t n_ubits) { + if (!suart->rx.running) + return -EAGAIN; for (size_t i = 0; i < n_ubits; i++) osmo_uart_rx_bit(suart, ubitsi); return 0; @@ -213,9 +213,6 @@ { ubit_t tx_bit = 1; - if (!suart->tx.running) - return tx_bit; - switch (suart->tx.flow_state) { case SUART_FLOW_ST_IDLE: if (msg && msgb_length(msg) > 0) { /* if we have pending data */ @@ -280,7 +277,8 @@ * \paramin suart soft-UART instance to pull the bits from. * \paramout ubits pointer to a buffer where to store pulled bits. * \paramin n_ubits number of unpacked bits to be pulled. - * \returns number of unpacked bits pulled; negative on error. */ + * \returns 0 on success; negative on error. + * -EAGAIN indicates that the transmitter is disabled. */ int osmo_soft_uart_tx_ubits(struct osmo_soft_uart *suart, ubit_t *ubits, size_t n_ubits) { const struct osmo_soft_uart_cfg *cfg = &suart->cfg; @@ -290,6 +288,9 @@ if (OSMO_UNLIKELY(n_ubits == 0)) return -EINVAL; + if (!suart->tx.running) + return -EAGAIN; + /* calculate UART frame size for the effective config */ n_frame_bits = 1 + cfg->num_data_bits + cfg->num_stop_bits; if (cfg->parity_mode != OSMO_SUART_PARITY_NONE) @@ -396,6 +397,22 @@ return 0; } +/*! Get a name for the given soft-UART instance. + * \paramin suart soft-UART instance to get the name from. + * \returns name of the given soft-UART instance. */ +const char *osmo_soft_uart_get_name(const struct osmo_soft_uart *suart) +{ + return suart->name; +} + +/*! Set a new name for the given soft-UART instance. + * \paramin suart soft-UART instance to set the name for. + * \paramin name the new name. */ +void osmo_soft_uart_set_name(struct osmo_soft_uart *suart, const char *name) +{ + osmo_talloc_replace_string(suart, (char **)&suart->name, name); +} + /*! Enable/disable receiver of the given soft-UART. * \paramin suart soft-UART instance to be re-configured. * \paramin enable enable/disable state of the receiver.
View file
libosmocore_1.9.0.68.846118.tar.xz/tests/soft_uart/soft_uart_test.c -> libosmocore_1.9.0.71.8116.tar.xz/tests/soft_uart/soft_uart_test.c
Changed
@@ -16,6 +16,7 @@ * */ +#include <errno.h> #include <stdio.h> #include <stdint.h> @@ -256,10 +257,18 @@ { struct osmo_soft_uart_cfg cfg; struct osmo_soft_uart *suart; + int rc; suart = osmo_soft_uart_alloc(NULL, __func__, &suart_test_default_cfg); OSMO_ASSERT(suart != NULL); + /* expect -EAGAIN when the transmitter is not enabled */ + rc = osmo_soft_uart_tx_ubits(suart, NULL, 42); + OSMO_ASSERT(rc == -EAGAIN); + /* expect -EAGAIN when the receiver is not enabled */ + rc = osmo_soft_uart_rx_ubits(suart, NULL, 42); + OSMO_ASSERT(rc == -EAGAIN); + osmo_soft_uart_set_tx(suart, true); osmo_soft_uart_set_rx(suart, true);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.