-
-
Save Geobert/a982c7a5671f0f9e62ecab0b7333bc20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
union Transmuter { | |
from: *const u8, | |
to: u32, | |
} | |
const IR_CAL_CFG: [u8; 26] = [ | |
25, 71, 3, 6, 4, 16, 0, 1, 1, 3, 1, 6, 0, 16, 39, 0, 0, 5, 0, 1, 1, 0, 0, 0, 0, 0, | |
]; | |
const PHY_INFO: [u32; 10] = [ | |
3, | |
0x000F0F0F, | |
0, | |
unsafe { | |
Transmuter { | |
from: &IR_CAL_CFG as *const _, | |
} | |
.to | |
}, | |
0, | |
0x00000000, | |
10200000, | |
35700000, | |
50000, | |
(1 << 8) | 1, | |
]; | |
const CHANNEL_CFG_ENTRY_ATTR: RAIL_ChannelConfigEntryAttr_t = RAIL_ChannelConfigEntryAttr_t { | |
calValues: [0xFFFFFFFF; 1], | |
}; | |
const CHANNEL_CFG_ENTRY: RAIL_ChannelConfigEntry_t = RAIL_ChannelConfigEntry_t { | |
phyConfigDeltaAdd: core::ptr::null(), | |
baseFrequency: 915000000, | |
channelSpacing: 1000000, | |
physicalChannelOffset: 0, | |
channelNumberStart: 0, | |
channelNumberEnd: 20, | |
maxPower: 0x7FFF, | |
attr: &CHANNEL_CFG_ENTRY_ATTR, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment