CC3200 有HTTP方式下载程序的例程吗?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
请去看程序里面:
void FactoryResetTask(void *pvParameters)
{
sBootInfo_t sBootInfo;
long lFileHandle;
unsigned long ulToken;
//
// Wait for button press
//
osi_SyncObjWait(&g_FactResetSyncObj, OSI_WAIT_FOREVER);
//
// Read the boot Info
//
if( 0 == sl_FsOpen((unsigned char *)IMG_BOOT_INFO, FS_MODE_OPEN_READ,
&ulToken, &lFileHandle) )
{
if( 0 > sl_FsRead(lFileHandle, 0, (unsigned char *)&sBootInfo,
sizeof(sBootInfo_t)) )
{
while(1)
{
}
}
sl_FsClose(lFileHandle, 0, 0, 0);
}
//
// Set the factory default
//
sBootInfo.ucActiveImg = IMG_ACT_FACTORY;
sBootInfo.ulImgStatus = IMG_STATUS_NOTEST;
//
// Save the new configuration
//
if( 0 == sl_FsOpen((unsigned char *)IMG_BOOT_INFO, FS_MODE_OPEN_WRITE,
&ulToken, &lFileHandle) )
{
sl_FsWrite(lFileHandle, 0, (unsigned char *)&sBootInfo,
sizeof(sBootInfo_t));
sl_FsClose(lFileHandle, 0, 0, 0);
}
//
// Force reboot
//
g_ulSysState = SYS_STATE_REBOOT;
while(1)
{
osi_Sleep(1000);
}
}
用的是 sl_FsWrite 文件系统读写。