1 /* Layer 1 Various primitive utilities */
3 /* (C) 2010 by Sylvain Munaut <tnt@246tNt.com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #include <osmocom/core/msgb.h>
26 #include <layer1/sync.h>
29 static const uint8_t ubUui[23] = {
30 /* dummy lapdm header */
34 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
35 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b,
36 0x2b, 0x2b, 0x2b, 0x2b
39 static uint8_t ubMeas[23] = {
40 /* L1 SAACH pseudo-header */
46 /* Measurement report */
47 0x06, 0x15, 0x36, 0x36, 0x01, 0xC0, 0x00, 0x00,
48 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
53 const uint8_t *pu_get_idle_frame(void)
58 void pu_update_rx_level(uint8_t rx_level)
60 ubMeas[7] = ubMeas[8] = rx_level;
63 const uint8_t *pu_get_meas_frame(void)
66 return l1s.tx_meas->l3h;
68 /* Update L1 SAACH pseudo-header */
69 ubMeas[0] = l1s.tx_power;