Tom Tsou | 9a5bbf3 | 2016-07-14 15:13:45 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | |
| 5 | /*! \brief Structure for CPS coding and puncturing scheme (TS 04.60 10.4.8a) */ |
| 6 | struct egprs_cps { |
| 7 | uint8_t bits; |
| 8 | uint8_t mcs; |
| 9 | uint8_t p[2]; |
| 10 | }; |
| 11 | |
| 12 | /*! \brief CPS puncturing table selection (TS 04.60 10.4.8a) */ |
| 13 | enum egprs_cps_punc { |
| 14 | EGPRS_CPS_P1, |
| 15 | EGPRS_CPS_P2, |
| 16 | EGPRS_CPS_P3, |
| 17 | EGPRS_CPS_NONE = -1, |
| 18 | }; |
| 19 | |
| 20 | /*! \brief EGPRS header types (TS 04.60 10.0a.2) */ |
| 21 | enum egprs_hdr_type { |
| 22 | EGPRS_HDR_TYPE1, |
| 23 | EGPRS_HDR_TYPE2, |
| 24 | EGPRS_HDR_TYPE3, |
| 25 | }; |
| 26 | |
| 27 | int egprs_get_cps(struct egprs_cps *cps, uint8_t type, uint8_t bits); |