43 #include <ti/devices/DeviceFamily.h> 44 #include DeviceFamily_constructPath(driverlib/ioc.h) 45 #include DeviceFamily_constructPath(driverlib/cpu.h) 47 #include <ti/drivers/rf/RF.h> 48 #include <ti/drivers/pin/PINCC26XX.h> 56 void CC1350_LAUNCHXL_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_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)
177 RF_RadioSetup* setupCommand = (RF_RadioSetup*)arg;
179 if (events & RF_GlobalEventRadioSetup) {
181 PINCC26XX_setOutputValue(Board_RF_POWER, 1);
183 if (setupCommand->common.commandNo == CMD_PROP_RADIO_DIV_SETUP) {
185 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 1);
188 else if (events & RF_GlobalEventRadioPowerDown) {
190 PINCC26XX_setOutputValue(Board_RF_POWER, 0);
191 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 0);
void CC1350_LAUNCHXL_shutDownExtFlash(void)
Turn off the external flash on LaunchPads.
void CC1350_LAUNCHXL_wakeUpExtFlash(void)
Wake up the external flash present on the board files.