bcm-specs

[Specification

This function finds 4 gain values and takes in one value

If the PHY Revision is 1 or less OR PHY Connected isn't set

  1. The first gain value is 0x20
  2. The third gain value is 0
  3. If the absolute value of the first passed in value is 0x14 or higher
    1. The second gain value is 1
    2. The fourth gain value is 2
  4. Otherwise, if the first passed in value is 0x12 or higher
    1. The second gain value is 1
    2. The fourth gain value is 1
  5. Otherwise, if the first passed in value is 0xF or higher
    1. The second gain value is 1
    2. The fourth gain value is 0
  6. Otherwise,
    1. The second gain value is 0
    2. The fourth gain value is 0
  7. If the second gain value is 0
    1. Unset bit 0x0008 in RadioRegister 0x7A

  8. Otherwise
    1. Set bit 0x0008 in RadioRegister 0x7A

Otherwise

  1. Find the absolute value of the first passed in value
  2. The first gain value is 0
  3. If PHYConnected is set and this is PHY Revision 2 or higher

    1. If the absolute value of the first passed in value is >= the second Loopback Gain value / 2

      1. Subtract the value of the second Loopback Gain value / 2 from the absolute value of the first passed in value and use this as the first passed in value

      2. The first gain value is 0x20
  4. If the first passed in value is 8 or less
    1. The second gain value is 0
  5. Otherwise
    1. The second gain value is 1
    2. Subtract 8 from the first passed in value and use this as the first passed in value
  6. Clamp the first passed in value between [0,0x2D]
  7. Divide the first passed in value by 3 and use this as the first passed in value
  8. If the value of the first passed in value is 5 or greater
    1. The third gain value is 2
    2. The fourth gain value is the first passed in value - 5
  9. Otherwise
    1. The third gain value is 0
    2. The fourth gain value is the first passed in value
  10. If the second gain value is 0
    1. Unset bit 0x0008 in RadioRegister 0x7A

  11. Otherwise
    1. Set bit 0x0008 in RadioRegister 0x7A


Exported/Archived from the wiki to HTML on 2016-10-27