static const uint16_t packet_setup[] = {
CC115L_MDMCFG3, (PACKET_DRATE_M),
static const uint16_t packet_setup[] = {
CC115L_MDMCFG3, (PACKET_DRATE_M),
(0 << CC115L_MDMCFG2_MANCHESTER_EN) |
(CC115L_MDMCFG2_SYNC_MODE_16BITS << CC115L_MDMCFG2_SYNC_MODE)),
};
/*
(0 << CC115L_MDMCFG2_MANCHESTER_EN) |
(CC115L_MDMCFG2_SYNC_MODE_16BITS << CC115L_MDMCFG2_SYNC_MODE)),
};
/*
CC115L_MDMCFG4, ((0xf << 4) |
(RDF_DRATE_E << CC115L_MDMCFG4_DRATE_E)),
CC115L_MDMCFG3, (RDF_DRATE_M),
CC115L_MDMCFG4, ((0xf << 4) |
(RDF_DRATE_E << CC115L_MDMCFG4_DRATE_E)),
CC115L_MDMCFG3, (RDF_DRATE_M),
(0 << CC115L_MDMCFG2_MANCHESTER_EN) |
(CC115L_MDMCFG2_SYNC_MODE_NONE << CC115L_MDMCFG2_SYNC_MODE)),
};
(0 << CC115L_MDMCFG2_MANCHESTER_EN) |
(CC115L_MDMCFG2_SYNC_MODE_NONE << CC115L_MDMCFG2_SYNC_MODE)),
};
CC115L_MDMCFG4, ((0xf << 4) |
(APRS_DRATE_E << CC115L_MDMCFG4_DRATE_E)),
CC115L_MDMCFG3, (APRS_DRATE_M),
CC115L_MDMCFG4, ((0xf << 4) |
(APRS_DRATE_E << CC115L_MDMCFG4_DRATE_E)),
CC115L_MDMCFG3, (APRS_DRATE_M),
(0 << CC115L_MDMCFG2_MANCHESTER_EN) |
(CC115L_MDMCFG2_SYNC_MODE_NONE << CC115L_MDMCFG2_SYNC_MODE)),
};
(0 << CC115L_MDMCFG2_MANCHESTER_EN) |
(CC115L_MDMCFG2_SYNC_MODE_NONE << CC115L_MDMCFG2_SYNC_MODE)),
};
AO_CC115L_DONE_INT_GPIO_IOCFG, CC115L_IOCFG_GPIO_CFG_PA_PD | (1 << CC115L_IOCFG_GPIO_INV),
CC115L_FIFOTHR, 0x47, /* TX FIFO Thresholds */
AO_CC115L_DONE_INT_GPIO_IOCFG, CC115L_IOCFG_GPIO_CFG_PA_PD | (1 << CC115L_IOCFG_GPIO_INV),
CC115L_FIFOTHR, 0x47, /* TX FIFO Thresholds */
- CC115L_MDMCFG1, (0x00 |
- (CC115L_MDMCFG1_NUM_PREAMBLE_4 << CC115L_MDMCFG1_NUM_PREAMBLE) |
- (1 << CC115L_MDMCFG1_CHANSPC_E)),
+ CC115L_MDMCFG1, /* Modem Configuration */
+ ((CC115L_MDMCFG1_NUM_PREAMBLE_4 << CC115L_MDMCFG1_NUM_PREAMBLE) |
+ (1 << CC115L_MDMCFG1_CHANSPC_E)),
CC115L_MCSM0, 0x38, /* Main Radio Control State Machine Configuration */
CC115L_RESERVED_0X20, 0xfb, /* Use setting from SmartRF Studio */
CC115L_MCSM0, 0x38, /* Main Radio Control State Machine Configuration */
CC115L_RESERVED_0X20, 0xfb, /* Use setting from SmartRF Studio */
CC115L_FSCAL3, 0xe9, /* Frequency Synthesizer Calibration */
CC115L_FSCAL2, 0x2a, /* Frequency Synthesizer Calibration */
CC115L_FSCAL1, 0x00, /* Frequency Synthesizer Calibration */
CC115L_FSCAL0, 0x1f, /* Frequency Synthesizer Calibration */
CC115L_FSCAL3, 0xe9, /* Frequency Synthesizer Calibration */
CC115L_FSCAL2, 0x2a, /* Frequency Synthesizer Calibration */
CC115L_FSCAL1, 0x00, /* Frequency Synthesizer Calibration */
CC115L_FSCAL0, 0x1f, /* Frequency Synthesizer Calibration */
+ CC115L_RESERVED_0X29, 0x59, /* RESERVED */
+ CC115L_RESERVED_0X2A, 0x7f, /* RESERVED */
+ CC115L_RESERVED_0X2B, 0x3f, /* RESERVED */
CC115L_TEST2, 0x81, /* Various Test Settings */
CC115L_TEST1, 0x35, /* Various Test Settings */
CC115L_TEST0, 0x09, /* Various Test Settings */
CC115L_TEST2, 0x81, /* Various Test Settings */
CC115L_TEST1, 0x35, /* Various Test Settings */
CC115L_TEST0, 0x09, /* Various Test Settings */
ao_radio_reg_write(CC115L_FREQ1, ao_config.radio_setting >> 8);
ao_radio_reg_write(CC115L_FREQ0, ao_config.radio_setting);
last_radio_setting = ao_config.radio_setting;
ao_radio_reg_write(CC115L_FREQ1, ao_config.radio_setting >> 8);
ao_radio_reg_write(CC115L_FREQ0, ao_config.radio_setting);
last_radio_setting = ao_config.radio_setting;
- for (power = POWER_STEP; power < RADIO_POWER; power += POWER_STEP)
- ao_radio_reg_write(CC115L_PA, power);
- if (power != RADIO_POWER)
- ao_radio_reg_write(CC115L_PA, RADIO_POWER);