Commit Graph

10 Commits

Author SHA1 Message Date
Vadim Yanitskiy c657a5028e gsm0502: add burst length definitions from chapter 5.2
Change-Id: I1c38ccc2b64ba9046bb3b1221d99cc55ec493802
Related: OS#1572
2023-03-07 13:25:36 +00:00
Pau Espin 6ca0a43294 gsm: constify several readonly params
Change-Id: Ib11bfe57f546a5618f70152b9b75115808e54bf6
2022-11-24 17:09:03 +01:00
Vadim Yanitskiy 8deedfa281 gsm0502: use parentheses in GSM_TDMA_FN_{SUM,SUB} macros
This makes it possible to pass expressions to the abovementioned
macros without any side-effects.  Strictly speaking, this is only
necessary for argument 'b' of GSM_TDMA_FN_SUB, but let's also add
them to GSM_TDMA_FN_SUM for consistency.

Change-Id: I7f26156813139bbb7774e1eb342c91bc84fdad38
2022-10-04 02:49:23 +07:00
Vadim Yanitskiy ed0445b38b gsm0502: add TDMA frame number constants and modular arithmetic
These TDMA constatns and modular arithmetic operations are used in
a number of osmo-* projects, so it makes sense to have them all
in a single header file, with minimalistic documentation.

Change-Id: Ic291fd3644f34964374227a191c7045d79d77e0d
2020-06-17 21:09:51 +00:00
Sylvain Munaut 63bee45411 libosmogsm: import hopping sequence generation code
This implementation is taken from OsmocomBB, in particular from:

  target/firmware/layer1/rfch.c

Change return type to uint16_t, because neither ARFCN, nor MAI
can be negative. Add prefix 'gsm0502_' to the function's name.

Change-Id: I8aba1578cc9d1bd89d4f5d33a6e8fedc8bea789a
Related: OS#4546
2020-05-15 17:56:41 +00:00
Philipp Maier 69e00ccd6f gsm0508: add functions to calculate beginning of a block
The calculation of the beginning of a block for TCH/F, TCH/H and FACCH
can be challenging since those channels are affected by the diagonal
interleaving of the TCH channels. However, GSM 05.02 Section 7 Table 1
of 5 specifies how the blocks are distributed over the TDMA frame
interval. Lets add a mapping function that is based on that table

Related: OS#3803
Change-Id: I3d71c66f8c401f5afbad9b1c86c24580dab9e0ce
2019-10-28 19:43:14 +00:00
Neels Hofmeyr 17518fe393 doxygen: unify use of \file across the board
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-23 00:18:23 +00:00
Sylvain Munaut 12ba778afd include: Switch to #pragma once pattern
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-06-16 10:17:27 +02:00
Harald Welte ea19c97816 import gsm0502_calc_paging_group() from openbsc 2011-06-26 14:47:16 +02:00
Harald Welte 94df39e905 add some utility functions for paging related calculation (TS 05.02) 2011-06-26 14:40:12 +02:00