41 #include <ti/devices/DeviceFamily.h> 42 #include DeviceFamily_constructPath(driverlib/ioc.h) 43 #include DeviceFamily_constructPath(driverlib/cpu.h) 45 #include <ti/drivers/rf/RF.h> 46 #include <ti/drivers/pin/PINCC26XX.h> 48 #include <ti/drivers/Board.h> 56 void CC1350_LAUNCHXL_433_sendExtFlashByte(PIN_Handle pinHandle, uint8_t byte)
61 PIN_setOutputValue(pinHandle, IOID_20, 0);
63 for (i = 0; i < 8; i++) {
64 PIN_setOutputValue(pinHandle, IOID_10, 0);
67 PIN_setOutputValue(pinHandle, IOID_9, (byte >> (7 - i)) & 0x01);
68 PIN_setOutputValue(pinHandle, IOID_10, 1);
78 PIN_setOutputValue(pinHandle, IOID_10, 0);
79 PIN_setOutputValue(pinHandle, IOID_20, 1);
93 PIN_Config extFlashPinTable[] = {
95 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
96 PIN_INPUT_DIS | PIN_DRVSTR_MED,
99 PIN_State extFlashPinState;
100 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
108 PIN_setOutputValue(extFlashPinHandle, IOID_20, 0);
111 PIN_setOutputValue(extFlashPinHandle, IOID_20, 1);
115 PIN_close(extFlashPinHandle);
129 PIN_Config extFlashPinTable[] = {
131 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
132 PIN_INPUT_DIS | PIN_DRVSTR_MED,
134 IOID_10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
135 PIN_INPUT_DIS | PIN_DRVSTR_MED,
137 IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
138 PIN_INPUT_DIS | PIN_DRVSTR_MED,
140 IOID_8 | PIN_INPUT_EN | PIN_PULLDOWN,
143 PIN_State extFlashPinState;
144 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
146 uint8_t extFlashShutdown = 0xB9;
148 CC1350_LAUNCHXL_433_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);
150 PIN_close(extFlashPinHandle);
157 void Board_initHook()
167 #if defined(Board_RF_SUB1GHZ) 174 void rfDriverCallback(RF_Handle client, RF_GlobalEvent events,
void *arg)
178 RF_RadioSetup* setupCommand = (RF_RadioSetup*)arg;
181 bool sub1GHz =
false;
182 uint8_t loDivider = 0;
184 if (events & RF_GlobalEventRadioSetup) {
186 PINCC26XX_setOutputValue(Board_RF_POWER, 1);
190 switch (setupCommand->common.commandNo) {
191 case (CMD_RADIO_SETUP):
192 case (CMD_BLE5_RADIO_SETUP):
193 loDivider = RF_LODIVIDER_MASK & setupCommand->common.loDivider;
196 if ((loDivider != 0) && (loDivider != 2)) {
200 case (CMD_PROP_RADIO_DIV_SETUP):
201 loDivider = RF_LODIVIDER_MASK & setupCommand->prop_div.loDivider;
204 if ((loDivider != 0) && (loDivider != 2)) {
213 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 1);
216 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
219 else if (events & RF_GlobalEventRadioPowerDown) {
221 PINCC26XX_setOutputValue(Board_RF_POWER, 0);
222 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
void CC1350_LAUNCHXL_433_shutDownExtFlash(void)
Turn off the external flash on LaunchPads.
void CC1350_LAUNCHXL_433_wakeUpExtFlash(void)
Wake up the external flash present on the board files.