Update corePKCS11 submodule pointer (#1208)

* Update corePKCS11 submodule pointer
* Fix corePKCS11 MQTT mutual authenticated demo
* Sync with other demo to wait for network up.
* Fix compiler warning.
This commit is contained in:
chinglee-iot
2024-04-16 14:11:57 +08:00
committed by GitHub
parent e6b4e8288f
commit 66b0b0a5a0
7 changed files with 30 additions and 14 deletions

View File

@@ -304,6 +304,10 @@ static MQTTStatus_t prvProcessLoopWithTimeout( MQTTContext_t * pMqttContext,
/*-----------------------------------------------------------*/
extern BaseType_t xPlatformIsNetworkUp( void );
/*-----------------------------------------------------------*/
/* @brief Static buffer used to hold MQTT messages being sent and received. */
static uint8_t ucSharedBuffer[ democonfigNETWORK_BUFFER_SIZE ];
@@ -416,7 +420,18 @@ static void prvMQTTDemoTask( void * pvParameters )
for( ; ; )
{
LogInfo( ( "---------STARTING DEMO---------\r\n" ) );
/****************************** Connect. ******************************/
/* Wait for Networking */
if( xPlatformIsNetworkUp() == pdFALSE )
{
LogInfo( ( "Waiting for the network link up event..." ) );
while( xPlatformIsNetworkUp() == pdFALSE )
{
vTaskDelay( pdMS_TO_TICKS( 1000U ) );
}
}
/* Establish a TLS connection with the MQTT broker. This example connects
* to the MQTT broker as specified by democonfigMQTT_BROKER_ENDPOINT and

View File

@@ -52,6 +52,8 @@
extern void vPlatformInitIpStack( void );
extern void vStartPKCSMutualAuthDemo( void );
/*-----------------------------------------------------------*/
int main( void )