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> 54 void CC1350_LAUNCHXL_433_sendExtFlashByte(PIN_Handle pinHandle, uint8_t byte)
59 PIN_setOutputValue(pinHandle, IOID_20, 0);
61 for (i = 0; i < 8; i++) {
62 PIN_setOutputValue(pinHandle, IOID_10, 0);
65 PIN_setOutputValue(pinHandle, IOID_9, (byte >> (7 - i)) & 0x01);
66 PIN_setOutputValue(pinHandle, IOID_10, 1);
76 PIN_setOutputValue(pinHandle, IOID_10, 0);
77 PIN_setOutputValue(pinHandle, IOID_20, 1);
91 PIN_Config extFlashPinTable[] = {
93 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
94 PIN_INPUT_DIS | PIN_DRVSTR_MED,
97 PIN_State extFlashPinState;
98 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
106 PIN_setOutputValue(extFlashPinHandle, IOID_20, 0);
109 PIN_setOutputValue(extFlashPinHandle, IOID_20, 1);
113 PIN_close(extFlashPinHandle);
127 PIN_Config extFlashPinTable[] = {
129 IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |
130 PIN_INPUT_DIS | PIN_DRVSTR_MED,
132 IOID_10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
133 PIN_INPUT_DIS | PIN_DRVSTR_MED,
135 IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |
136 PIN_INPUT_DIS | PIN_DRVSTR_MED,
138 IOID_8 | PIN_INPUT_EN | PIN_PULLDOWN,
141 PIN_State extFlashPinState;
142 PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
144 uint8_t extFlashShutdown = 0xB9;
146 CC1350_LAUNCHXL_433_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);
148 PIN_close(extFlashPinHandle);
155 void Board_initHook()
165 #if defined(Board_RF_SUB1GHZ) 172 void rfDriverCallback(RF_Handle client, RF_GlobalEvent events,
void *arg)
175 RF_RadioSetup* setupCommand = (RF_RadioSetup*)arg;
177 if (events & RF_GlobalEventRadioSetup) {
179 PINCC26XX_setOutputValue(Board_RF_POWER, 1);
181 if (setupCommand->common.commandNo == CMD_PROP_RADIO_DIV_SETUP) {
183 PINCC26XX_setOutputValue(Board_RF_SUB1GHZ, 1);
186 else if (events & RF_GlobalEventRadioPowerDown) {
188 PINCC26XX_setOutputValue(Board_RF_POWER, 0);
189 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.