l1_rf12.c

来自「是一个手机功能的模拟程序」· C语言 代码 · 共 2,110 行 · 第 1/5 页

C
2,110 行
字号
        },
        {// Ramp-Down    #0 profile
          0,12,19,31,31,18,17,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #1 profile - Power Level 6
          0,0,3,3,1,4,0,3,
          6,5,15,31,31,9,12,5
        },
        {// Ramp-Down    #1 profile
          9,23,25,31,25,15,0,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #2 profile - Power Level 7
          1,1,4,0,4,2,5,2,
          4,2,12,19,31,18,15,8
        },
        {// Ramp-Down    #2 profile
          9,30,31,31,16,11,0,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #3 profile - Power Level 8
          2,1,3,2,4,5,4,4,
          5,10,11,5,15,20,22,15
        },
        {// Ramp-Down    #3 profile
          8,12,16,31,31,9,7,6,
          3,3,2,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #4 profile - Power Level 9
          0,4,3,1,0,4,0,2,
          10,13,0,0,31,31,26,3
        },
        {// Ramp-Down    #4 profile
          8,9,28,31,31,7,5,2,
          7,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #5 profile - Power Level 10
          0,0,0,5,0,3,4,6,
          18,11,1,0,31,31,15,3
        },
        {// Ramp-Down    #5 profile
          7,11,31,31,31,17,0,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #6 profile - Power Level 11
          0,0,7,4,3,5,1,6,
          2,17,5,1,15,27,25,10
        },
        {// Ramp-Down    #6 profile
          6,14,27,31,29,7,4,3,
          7,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #7 profile - Power Level 12
          0,2,5,9,1,4,5,6,
          9,14,8,1,31,19,10,4
        },
        {// Ramp-Down    #7 profile
          9,5,31,31,31,5,5,6,
          0,3,2,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #8 profile - Power Level 13
          0,0,0,12,4,9,9,13,
          11,10,9,3,18,12,11,7
        },
        {// Ramp-Down    #8 profile
          8,9,28,31,27,8,5,4,
          8,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #9 profile - Power Level 14
          0,0,0,6,11,11,10,8,
          7,5,5,5,19,29,12,0
        },
        {// Ramp-Down    #9 profile
          8,18,31,31,31,9,0,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #10 profile - Power Level 15
          0,0,0,0,0,0,9,31,
          31,31,12,5,2,0,3,4
        },
        {// Ramp-Down    #10 profile
          4,18,31,31,31,13,0,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #11 profile - Power Level 16
          0,0,0,0,0,0,27,31,
          31,31,3,0,1,2,0,2
        },
        {// Ramp-Down    #11 profile
          3,9,30,31,31,24,0,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #12 profile - Power Level 17
          0,0,0,0,0,5,31,31,
          30,31,0,0,0,0,0,0
        },
        {// Ramp-Down    #12 profile
          6,8,31,31,19,20,12,1,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #13 profile - Power Level 18
          0,0,0,0,18,17,31,31,
          17,14,0,0,0,0,0,0
        },
        {// Ramp-Down    #13 profile
          3,7,29,31,31,27,0,0,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #14 profile - Power Level 19
          0,0,0,9,12,15,30,31,          17,14,0,0,0,0,0,0
        },
        {// Ramp-Down    #14 profile
          0,0,7,20,26,31,31,13,
          0,0,0,0,0,0,0,0
        },
      },
      {
        {// Ramp-Up      #15 profile - Power Level 19
          0,0,0,9,12,15,30,31,
          17,14,0,0,0,0,0,0
        },
        {// Ramp-Down    #15 profile
          0,0,7,20,26,31,31,13,
          0,0,0,0,0,0,0,0
        },
      },
    },
#else
{ { 0,0,0,25,0,0,7,0,0,18,31,31,16,0,0,0  },        // Ramp-Up       #0 profile - Power Level 5
{   10,14,21,22,31,20,0,0,0,10,0,0,0,0,0,0  }, },     // Ramp-Down   #0 profile
{ { 0,0,0,0,29,0,0,2,0,0,31,31,31,4,0,0  },        // Ramp-Up       #0 profile - Power Level 6
{   0,9,31,31,31,26,0,0,0,0,0,0,0,0,0,0  }, },    // Ramp-Down  #0 profile
{ { 0,0,0,0,0,0,31,6,0,0,29,31,31,0,0,0  },        // Ramp-Up        #0 profile - Power Level 7
{   0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0  }, },      // Ramp-Down     # profile
{ { 0,0,0,10,0,25,0,0,0,11,31,31,20,0,0,0  },        // Ramp-Up       #0 profile - Power Level 8
{   0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0  }, },      // Ramp-Down   #0 profile
{ { 0,0,0,0,0,0,0,0,0,22,0,0,13,31,31,31  },         // Ramp-Up       #0 profile - Power Level 9
{   0,31,31,31,31,4,0,0,0,0,0,0,0,0,0,0  }, },      // Ramp-Down   #0 profile
{ { 0,31,0,0,0,0,0,0,25,0,23,25,24,0,0,0  },      // Ramp-Up       #0 profile - Power Level 10
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },      // Ramp-Down   #0 profile
{ { 0,0,30,0,0,0,0,0,0,31,0,16,31,20,0,0  },         // Ramp-Up       #0 profile - Power Level 11
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },       // Ramp-Down   #0 profile
{ { 0,0,0,31,0,0,30,0,0,0,15,31,10,11,0,0  },         // Ramp-Up      #0 profile - Power Level 12
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },     // Ramp-Down    #0 profile
{ { 0,0,31,0,0,13,0,31,0,0,13,18,22,0,0,0  },        // Ramp-Up       #0 profile - Power Level 13
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },     // Ramp-Down     #0 profile
{ { 0,0,0,31,0,0,0,0,11,31,31,0,24,0,0,0  },         // Ramp-Up        #0 profile - Power Level 14
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },     // Ramp-Down     #0 profile
{ { 15,0,0,0,0,0,0,20,31,31,31,0,0,0,0,0  },        // Ramp-Up      #0 profile - Power Level 15
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },     // Ramp-Down     #0 profile
{ { 0,0,0,0,0,4,31,31,31,31,0,0,0,0,0,0  },        // Ramp-Up       #0 profile - Power Level 16
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },    // Ramp-Down    #0 profile
{ { 0,0,0,0,4,31,31,31,31,0,0,0,0,0,0,0  },        // Ramp-Up       #0 profile - Power Level 17
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },    // Ramp-Down    #0 profile
{ { 0,0,0,0,17,31,31,31,18,0,0,0,0,0,0,0  },        // Ramp-Up       #0 profile - Power Level 18
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  }, },    // Ramp-Down    #0 profile
{ { 0,0,0,0,31,31,31,31,4,0,0,0,0,0,0,0  },        // Ramp-Up       #0 profile - Power Level 19
{   0,0,31,31,31,31,4,0,0,0,0,0,0,0,0,0  } } },    // Ramp-Down    #0 profile
#endif
    { //TX temperature compensation
      #if (ORDER2_TX_TEMP_CAL==1)
      { -11,  0,  0,  0 },
      {  +9,  0,  0,  0 },
      { +39,  0,  0,  0 },
      { +59,  0,  0,  0 },
      { 127,  0,  0,  0 }
      #else
      { -11,  0 },
      {  +9,  0 },
      { +39,  0 },
      { +59,  0 },
      { 127,  0 }
      #endif
    },
  },
  //IQ swap
  SWAP_IQ_GSM850,
};

//copy from dcs1800
const T_RF_BAND rf_1900 =
{
  { //RX structure
    { //T_RX_CAL_PARAMS rx_cal_params
      188,      //g_magic
       40,      //lna gain * 2
       40,      //lna_th_high
       44       //lna_th_low
    },
    { //T_RF_AGC_BAND   agc_bands[RF_RX_CAL_CHAN_SIZE];
     /*--------------*/
     /*-- PCS band --*/
     /*--------------*/
      { 548,  0},     //
      { 622,  0},     //
      { 680,  0},     //
      { 745,  0},     //
      { 812,  0},     //
      { 860,  0},     //
      { 885,  0},     //
      { 991,  0},    //
      { 992,  0},    //
      {1023,  0},    //
    },
    { //RX temperature compensation
      { -15 ,  0  },
      {  -5 ,  0  },
      {   6 ,  0  },
      {  16 ,  0  },
      {  25 ,  0  },
      {  35 ,  0  },
      {  45 ,  0  },
      {  56 ,  0  },
      {  66 ,  0  },
      {  75 ,  0  },
      { 100 ,  0  }
    }
  },
  { //TX structure
    {// pcs1900 T_LEVEL_TX
#if (PA == 3)  // Hitachi
      {915, 0, 0}, // 0 Highest power
      {715, 1, 0}, // 1
      {570, 2, 0}, // 2
      {465, 3, 0}, // 3
      {390, 4, 0}, // 4
      {320, 5, 0}, // 5
      {265, 6, 0}, // 6
      {220, 7, 0}, // 7
      {183, 8, 0}, // 8
      {155, 9, 0}, // 9
      {129, 10, 0}, // 10
      {111, 11, 0}, // 11
      {93, 12, 0}, // 12
      {80, 13, 0}, // 13
      {72, 14, 0}, // 14
      {62, 15, 0}, // 15 Lowest power
      {62, 15, 0}, // 16
      {62, 15, 0}, // 17
      {62, 15, 0}, // 18
      {62, 15, 0}, // 19
      {62, 15, 0}, // 20
      {62, 15, 0}, // 21
      {62, 15, 0}, // 22
      {62, 15, 0}, // 23
      {62, 15, 0}, // 24
      {62, 15, 0}, // 25
      {62, 15, 0}, // 26
      {62, 15, 0}, // 27
      {62, 15, 0}, // 28
      {915, 0, 0}, // 29 Highest power
      {915, 0, 0}, // 30 Highest power
      {915, 0, 0}, // 31 Highest power
#else
      { 949, 0, 0  }, // 0 Highest power
      { 615, 1, 0  }, // 1
      { 499, 2, 0  }, // 2
      { 404, 3, 0  }, // 3
      { 328, 4, 0  }, // 4
      { 270, 5, 0  }, // 5
      { 224, 6, 0  }, // 6
      { 187, 7, 0  }, // 7
      { 158, 8, 0  }, // 8
      { 137, 9, 0  }, // 9
      { 119, 10, 0  }, // 10
      { 105, 11, 0  }, // 11
      { 92, 12, 0  }, // 12
      { 81, 13, 0  }, // 13
      { 75, 14, 0  }, // 14
      { 70, 15, 0  }, // 15 Lowest power
      { 70, 15, 0  }, // 16
      { 70, 15, 0  }, // 17
      { 70, 15, 0  }, // 18
      { 70, 15, 0  }, // 19
      { 70, 15, 0  }, // 20
      { 70, 15, 0  }, // 21
      { 70, 15, 0  }, // 22
      { 70, 15, 0  }, // 23
      { 70, 15, 0  }, // 24
      { 70, 15, 0  }, // 25
      { 70, 15, 0  }, // 26
      { 70, 15, 0  }, // 27
      { 70, 15, 0  }, // 28
      { 754, 0, 0  }, // 29 Highest power
      { 754, 0, 0  }, // 30 Highest power
      { 754, 0, 0  }, // 31 Highest power
#endif
    },
    {// Channel Calibration Tables
      {// arfcn, tx_chan_cal
        {  554, 128 }, // Calibration Table 0
        {  722, 128 },
        {  746, 128 },
        {  774, 128 },
        {  808, 128 },
        {  810, 128 },
        {  810, 128 },
        {  810, 128 }
      },
      {
        {  554, 128 }, // Calibration Table 1
        {  722, 128 },
        {  746, 128 },
        {  774, 128 },
        {  808, 128 },
        {  810, 128 },
        {  810, 128 },
        {  810, 128 }
      },
      {// arfcn, tx_chan_cal
        {  554, 128 }, // Calibration Table 2
        {  722, 128 },
        {  746, 128 },
        {  774, 128 },
        {  808, 128 },
        {  810, 128 },
        {  810, 128 },
        {  810, 128 }
      },
      {// arfcn, tx_chan_cal
        {  554, 128 }, // Calibration Table 3
        {  722, 128 },
        {  746, 128 },
        {  774, 128 },
        {  808, 128 },
        {  810, 128 },
        {  810, 128 },
        {  810, 128 }
      }
    },
    { // PCS Power Ramp Values
#if (PA == 3)  // Hitachi
     {
	    {// Ramp-Up      #0 profile - Power Level 0
          0,0,0,0,6,2,0,1,
          5,4,12,31,31,25,10,1
      },
      {// Ramp-Down    #0 profile
        8,11,18,31,31,17,12,0,
        0,0,0,0,0,0,0,0
      },
     },
     {
      {// Ramp-Up      #1 profile - Power Level 1
        0,0,0,0,7,6,1,3,
        4,0,2,15,31,31,24,4
      },
      {// Ramp-Down    #1 profile
        8,25,31,19,19,20,6,0,
        0,0,0,0,0,0,0,0
      },
     },
     {
      {// Ramp-Up      #2 profile - Power Level 2
        0,0,0,0,8,6,0,2,
        4,6,3,17,31,31,18,2
      },
      {// Ramp-Down    #2 profile
        4,10,31,29,31,23,0,0,
        0,0,0,0,0,0,0,0
      },
     },
     {
      {// Ramp-Up      #3 profile - Power Level 3
        0,0,0,0,3,4,10,4,
        2,0,2,13,31,31,26,2
      },
      {// Ramp-Down    #3 profile
        6,24,22,20,27,20,9,0,
        0,0,0,0,0,0,0,0
      },
     },
     {
      {// Ramp-Up      #4 profile - Power Level 4
        0,0,0,8,0,6,7,9,
        2,0,7,7,31,31,19,1
      },
      {// Ramp-Down    #4 profile
        3,14,28,31,31,12,9,0,
        0,0,0,0,0,0,0,0
      },
     },
     {
      {// Ramp-Up      #5 profile - Power Level 5
        0,0,0,1,12,0,4,4,
        4,9,6,12,31,27,17,1
      },
      {// Ramp-Down    #5 profile
        3,18,31,31,11,26,4,4,
        0,0,0,0,0,0,0,0
      },
     },
     {

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?