Update Inventek firmware version check
Inventek module does not work with OFFLOAD_SSL in case where version number is
C3.5.2.5, and instead needs FW version to be C3.5.2.5.STM.  This commit
appends a check for the "STM" version string.
Resolves issue of
@@ -74,6 +74,8 @@ const AppVersion32_t xAppFirmwareVersion =
#define mainREQUIRED_WIFI_FIRMWARE_WICED_MINOR_VERSION ( 5 )
#define mainREQUIRED_WIFI_FIRMWARE_WICED_PATCH_VERSION ( 2 )
#define mainREQUIRED_WIFI_FIRMWARE_INVENTEK_VERSION ( 5 )
+#define mainREQUIRED_WIFI_FIRMWARE_DESCRIPTOR_STRING ( "STM" )
+
/*-----------------------------------------------------------*/
void vApplicationDaemonTaskStartupHook( void );
@@ -512,7 +514,10 @@ void Error_Handler( void )
void vApplicationMallocFailedHook()
{
taskDISABLE_INTERRUPTS();
- for( ;; );
+
+ for( ; ; )
+ {
+ }
}
/*-----------------------------------------------------------*/
@@ -533,7 +538,9 @@ void vApplicationStackOverflowHook( TaskHandle_t xTask,
portDISABLE_INTERRUPTS();
/* Loop forever */
- for( ; ; );
+ for( ; ; )
+ {
+ }
}
/*-----------------------------------------------------------*/
@@ -668,6 +675,7 @@ static void prvInitializeHeap( void )
{
int32_t lWicedMajorVersion = 0, lWicedMinorVersion = 0, lWicedPatchVersion = 0, lInventekVersion = 0, lParsedFields = 0;
uint8_t ucFirmwareVersion[ ES_WIFI_FW_REV_SIZE ];
+
BaseType_t xNeedsUpdate = pdFALSE;
if( WIFI_GetFirmwareVersion( &( ucFirmwareVersion[ 0 ] ) ) == eWiFiSuccess )
@@ -707,6 +715,10 @@ static void prvInitializeHeap( void )
{
xNeedsUpdate = pdTRUE;
}
+ else if( NULL == strstr( ucFirmwareVersion, mainREQUIRED_WIFI_FIRMWARE_DESCRIPTOR_STRING ) )
+ {
+ xNeedsUpdate = pdTRUE;
+ }
/* Print a warning for the user to inform that the WiFi Firmware
* needs to be updated. */
@@ -745,17 +757,13 @@ void HAL_GPIO_EXTI_Callback( uint16_t GPIO_Pin )
/* Pin number 1 is connected to Inventek Module Cmd-Data
* ready pin. */
case ( GPIO_PIN_1 ):
- {
SPI_WIFI_ISR();
break;
- }
default:
- {
break;
}
}
-}
/*-----------------------------------------------------------*/
/**
