See 2056 Radio Channel Table and 2055 Radio Channel Table for tables and description
u8 N PHY Get Channel Frequency Range (int channel)
- If the band is 2G
- Return 0
- If channel is zero
- Get current channel from wherever it is available
If PHY Revision < 3
Set channel_ptr to 2055 Radio Channel Table
- Set len to length of that table
- Else if PHY Revision is 3
Set channel_ptr to PHY Revision 3 Table
- Set len to length of that table
- Else if PHY Revision is 4
Set channel_ptr to PHY Revision 4 Table
- Set len to length of that table
- Else if Radio Revision is 5
Set channel_ptr to PHY Revision 5 Table
- Set len to length of that table
- Else if Radio Revision is 6
Set channel_ptr to PHY Revision 6 Table
- Set len to length of that table
- Else if Radio Revision is 7 or 9
Set channel_ptr to PHY Revision 7 or 9 Table
- Set len to length of that table
- Else if Radio Revision is 8
Set channel_ptr to PHY Revision 8 Table
- Set len to length of that table
- Otherwise
- Return 0
- Loop len times with i as index
- If the channel entry in the table equals channel
- Break
If i >= len
- Return 0
- Set freq to the frequency value from the table
- If the channel entry in the table equals channel
If (freq >= 4900) and (freq < 5100)
- Return 1
Else if (freq >= 5100) and (freq < 5500)
- Return 2
- Return 3