blob: 5765281be63d40e87b1410a86d78aaa539ce6a82 [file] [log] [blame]
Tom Tsou9a5bbf32016-07-14 15:13:45 -07001#pragma once
2
3#include <stdint.h>
4
Neels Hofmeyr87e45502017-06-20 00:17:59 +02005/*! Structure for CPS coding and puncturing scheme (TS 04.60 10.4.8a) */
Tom Tsou9a5bbf32016-07-14 15:13:45 -07006struct egprs_cps {
7 uint8_t bits;
8 uint8_t mcs;
9 uint8_t p[2];
10};
11
Neels Hofmeyr87e45502017-06-20 00:17:59 +020012/*! CPS puncturing table selection (TS 04.60 10.4.8a) */
Tom Tsou9a5bbf32016-07-14 15:13:45 -070013enum egprs_cps_punc {
14 EGPRS_CPS_P1,
15 EGPRS_CPS_P2,
16 EGPRS_CPS_P3,
17 EGPRS_CPS_NONE = -1,
18};
19
Neels Hofmeyr87e45502017-06-20 00:17:59 +020020/*! EGPRS header types (TS 04.60 10.0a.2) */
Tom Tsou9a5bbf32016-07-14 15:13:45 -070021enum egprs_hdr_type {
22 EGPRS_HDR_TYPE1,
23 EGPRS_HDR_TYPE2,
24 EGPRS_HDR_TYPE3,
25};
26
27int egprs_get_cps(struct egprs_cps *cps, uint8_t type, uint8_t bits);