有没有这个函数:CC2640R2_LAUNCHXL_shutDownExtFlash的介绍?
Alvin Chen:
就是挂起外部FLASH的IO:*======== CC2640R2_LAUNCHXL_shutDownExtFlash ========*/
void CC2640R2_LAUNCHXL_shutDownExtFlash(void)
{/**To be sure we are putting the flash into sleep and not waking it,*we first have to make a wake up call*/CC2640R2_LAUNCHXL_wakeUpExtFlash();
PIN_Config extFlashPinTable[] = {/* SPI Flash CS*/IOID_20 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH | PIN_PUSHPULL |PIN_INPUT_DIS | PIN_DRVSTR_MED,/* SPI Flash CLK */IOID_10 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |PIN_INPUT_DIS | PIN_DRVSTR_MED,/* SPI Flash MOSI */IOID_9 | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL |PIN_INPUT_DIS | PIN_DRVSTR_MED,/* SPI Flash MISO */IOID_8 | PIN_INPUT_EN | PIN_PULLDOWN,PIN_TERMINATE};PIN_State extFlashPinState;PIN_Handle extFlashPinHandle = PIN_open(&extFlashPinState, extFlashPinTable);
uint8_t extFlashShutdown = 0xB9;
CC2640R2_LAUNCHXL_sendExtFlashByte(extFlashPinHandle, extFlashShutdown);
PIN_close(extFlashPinHandle);
}