@@ -202,7 +202,7 @@ static CellularError_t libOpen( CellularContext_t * pContext )
202202
203203 if ( pktStatus != CELLULAR_PKT_STATUS_OK )
204204 {
205- CellularLogError ( "pktio failed to initialize" );
205+ LogError ( ( "pktio failed to initialize" ) );
206206 _Cellular_PktioShutdown ( pContext );
207207 _Cellular_PktHandlerCleanup ( pContext );
208208 }
@@ -268,7 +268,7 @@ static void libClose( CellularContext_t * pContext )
268268 }
269269
270270 PlatformMutex_Unlock ( & pContext -> libStatusMutex );
271- CellularLogDebug ( "CELLULARLib closed" );
271+ LogDebug ( ( "CELLULARLib closed" ) );
272272}
273273
274274/*-----------------------------------------------------------*/
@@ -390,22 +390,22 @@ static CellularError_t checkInitParameter( const CellularHandle_t * pCellularHan
390390
391391 if ( pCellularHandle == NULL )
392392 {
393- CellularLogError ( "Invalid CellularHandler pointer." );
393+ LogError ( ( "Invalid CellularHandler pointer." ) );
394394 cellularStatus = CELLULAR_INVALID_HANDLE ;
395395 }
396396 else if ( ( pCommInterface == NULL ) || ( pCommInterface -> open == NULL ) ||
397397 ( pCommInterface -> close == NULL ) || ( pCommInterface -> send == NULL ) ||
398398 ( pCommInterface -> recv == NULL ) )
399399 {
400- CellularLogError ( "All the functions in the CellularCommInterface should be valid." );
400+ LogError ( ( "All the functions in the CellularCommInterface should be valid." ) );
401401 cellularStatus = CELLULAR_BAD_PARAMETER ;
402402 }
403403 else if ( ( pTokenTable == NULL ) || ( pTokenTable -> pCellularUrcHandlerTable == NULL ) ||
404404 ( pTokenTable -> pCellularSrcTokenErrorTable == NULL ) ||
405405 ( pTokenTable -> pCellularSrcTokenSuccessTable == NULL ) ||
406406 ( pTokenTable -> pCellularUrcTokenWoPrefixTable == NULL ) )
407407 {
408- CellularLogError ( "All the token tables in the CellularTokenTable should be valid." );
408+ LogError ( ( "All the token tables in the CellularTokenTable should be valid." ) );
409409 cellularStatus = CELLULAR_BAD_PARAMETER ;
410410 }
411411 else
@@ -453,7 +453,7 @@ CellularError_t _Cellular_CheckLibraryStatus( CellularContext_t * pContext )
453453
454454 if ( ( pContext -> bLibShutdown == true ) || ( pContext -> bLibClosing == true ) )
455455 {
456- CellularLogError ( "Cellular Lib indicated a failure[%d][%d]" , pContext -> bLibShutdown , pContext -> bLibClosing );
456+ LogError ( ( "Cellular Lib indicated a failure[%d][%d]" , pContext -> bLibShutdown , pContext -> bLibClosing ) );
457457 cellularStatus = CELLULAR_INTERNAL_FAILURE ;
458458 }
459459
@@ -484,7 +484,7 @@ CellularError_t _Cellular_TranslatePktStatus( CellularPktStatus_t status )
484484 case CELLULAR_PKT_STATUS_BAD_RESPONSE :
485485 case CELLULAR_PKT_STATUS_SIZE_MISMATCH :
486486 default :
487- CellularLogError ( "_Cellular_TranslatePktStatus: Status %d" , status );
487+ LogError ( ( "_Cellular_TranslatePktStatus: Status %d" , status ) );
488488 cellularStatus = CELLULAR_INTERNAL_FAILURE ;
489489 break ;
490490 }
@@ -514,7 +514,7 @@ CellularPktStatus_t _Cellular_TranslateAtCoreStatus( CellularATError_t status )
514514 case CELLULAR_AT_ERROR :
515515 case CELLULAR_AT_UNKNOWN :
516516 default :
517- CellularLogError ( "_Cellular_TranslateAtCoreStatus: Status %d" , status );
517+ LogError ( ( "_Cellular_TranslateAtCoreStatus: Status %d" , status ) );
518518 pktStatus = CELLULAR_PKT_STATUS_FAILURE ;
519519 break ;
520520 }
@@ -571,11 +571,11 @@ CellularError_t _Cellular_CreateSocketData( CellularContext_t * pContext,
571571
572572 if ( cellularStatus == CELLULAR_NO_MEMORY )
573573 {
574- CellularLogError ( "_Cellular_CreateSocket, Out of memory" );
574+ LogError ( ( "_Cellular_CreateSocket, Out of memory" ) );
575575 }
576576 else if ( socketId >= CELLULAR_NUM_SOCKET_MAX )
577577 {
578- CellularLogError ( "_Cellular_CreateSocket, No free socket slots are available" );
578+ LogError ( ( "_Cellular_CreateSocket, No free socket slots are available" ) );
579579 cellularStatus = CELLULAR_NO_MEMORY ;
580580 }
581581 else
@@ -596,7 +596,7 @@ CellularError_t _Cellular_RemoveSocketData( CellularContext_t * pContext,
596596
597597 if ( socketHandle -> socketState == SOCKETSTATE_CONNECTING )
598598 {
599- CellularLogWarn ( "_Cellular_RemoveSocket, socket is connecting state [%d]" , socketHandle -> socketId );
599+ LogWarn ( ( "_Cellular_RemoveSocket, socket is connecting state [%d]" , socketHandle -> socketId ) );
600600 }
601601
602602 taskENTER_CRITICAL ();
@@ -649,7 +649,7 @@ CellularError_t _Cellular_IsValidSocket( const CellularContext_t * pContext,
649649 {
650650 if ( ( sockIndex >= CELLULAR_NUM_SOCKET_MAX ) || ( pContext -> pSocketData [ sockIndex ] == NULL ) )
651651 {
652- CellularLogError ( "_Cellular_IsValidSocket, invalid socket handle %d" , sockIndex );
652+ LogError ( ( "_Cellular_IsValidSocket, invalid socket handle %d" , sockIndex ) );
653653 cellularStatus = CELLULAR_BAD_PARAMETER ;
654654 }
655655 }
@@ -665,8 +665,8 @@ CellularError_t _Cellular_IsValidPdn( uint8_t contextId )
665665
666666 if ( ( contextId > CELLULAR_PDN_CONTEXT_ID_MAX ) || ( contextId < CELLULAR_PDN_CONTEXT_ID_MIN ) )
667667 {
668- CellularLogError ( "_Cellular_IsValidPdn: ContextId out of range %d" ,
669- contextId );
668+ LogError ( ( "_Cellular_IsValidPdn: ContextId out of range %d" ,
669+ contextId ) );
670670 cellularStatus = CELLULAR_BAD_PARAMETER ;
671671 }
672672
@@ -794,12 +794,12 @@ CellularError_t _Cellular_ComputeSignalBars( CellularRat_t rat,
794794 if ( ( rat == CELLULAR_RAT_GSM ) || ( rat == CELLULAR_RAT_EDGE ) )
795795 {
796796 pSignalInfo -> bars = _getSignalBars ( pSignalInfo -> rssi , rat );
797- CellularLogDebug ( "_computeSignalBars: RSSI %d Bars %d" , pSignalInfo -> rssi , pSignalInfo -> bars );
797+ LogDebug ( ( "_computeSignalBars: RSSI %d Bars %d" , pSignalInfo -> rssi , pSignalInfo -> bars ) );
798798 }
799799 else if ( ( rat == CELLULAR_RAT_LTE ) || ( rat == CELLULAR_RAT_CATM1 ) || ( rat == CELLULAR_RAT_NBIOT ) )
800800 {
801801 pSignalInfo -> bars = _getSignalBars ( pSignalInfo -> rsrp , rat );
802- CellularLogDebug ( "_computeSignalBars: RSRP %d Bars %d" , pSignalInfo -> rsrp , pSignalInfo -> bars );
802+ LogDebug ( ( "_computeSignalBars: RSRP %d Bars %d" , pSignalInfo -> rsrp , pSignalInfo -> bars ) );
803803 }
804804 else
805805 {
@@ -822,7 +822,7 @@ CellularError_t _Cellular_GetCurrentRat( CellularContext_t * pContext,
822822
823823 if ( cellularStatus != CELLULAR_SUCCESS )
824824 {
825- CellularLogDebug ( "_Cellular_CheckLibraryStatus failed" );
825+ LogDebug ( ( "_Cellular_CheckLibraryStatus failed" ) );
826826 }
827827 else if ( pRat == NULL )
828828 {
@@ -907,13 +907,13 @@ CellularSocketContext_t * _Cellular_GetSocketData( const CellularContext_t * pCo
907907
908908 if ( pContext == NULL )
909909 {
910- CellularLogError ( "Invalid context" );
910+ LogError ( ( "Invalid context" ) );
911911 }
912912 else
913913 {
914914 if ( ( sockIndex >= CELLULAR_NUM_SOCKET_MAX ) || ( pContext -> pSocketData [ sockIndex ] == NULL ) )
915915 {
916- CellularLogError ( "_Cellular_GetSocketData, invalid socket handle %d" , sockIndex );
916+ LogError ( ( "_Cellular_GetSocketData, invalid socket handle %d" , sockIndex ) );
917917 }
918918 else
919919 {
@@ -941,15 +941,15 @@ CellularError_t _Cellular_LibInit( CellularHandle_t * pCellularHandle,
941941
942942 if ( cellularStatus != CELLULAR_SUCCESS )
943943 {
944- CellularLogError ( "_Cellular_CommonInit checkInitParameter failed" );
944+ LogError ( ( "_Cellular_CommonInit checkInitParameter failed" ) );
945945 }
946946 else
947947 {
948948 pContext = _Cellular_AllocContext ();
949949
950950 if ( pContext == NULL )
951951 {
952- CellularLogError ( "CellularContext_t allocation failed" );
952+ LogError ( ( "CellularContext_t allocation failed" ) );
953953 cellularStatus = CELLULAR_NO_MEMORY ;
954954 }
955955 else
@@ -967,7 +967,7 @@ CellularError_t _Cellular_LibInit( CellularHandle_t * pCellularHandle,
967967 {
968968 if ( _Cellular_CreateLibStatusMutex ( pContext ) != true )
969969 {
970- CellularLogError ( "Could not create CellularLib status mutex" );
970+ LogError ( ( "Could not create CellularLib status mutex" ) );
971971 cellularStatus = CELLULAR_RESOURCE_CREATION_FAIL ;
972972 }
973973 else
@@ -980,7 +980,7 @@ CellularError_t _Cellular_LibInit( CellularHandle_t * pCellularHandle,
980980 {
981981 if ( _Cellular_CreateAtDataMutex ( pContext ) != true )
982982 {
983- CellularLogError ( "Could not create CELLULAR AT Data mutex " );
983+ LogError ( ( "Could not create CELLULAR AT Data mutex " ) );
984984 cellularStatus = CELLULAR_RESOURCE_CREATION_FAIL ;
985985 }
986986 else
@@ -993,7 +993,7 @@ CellularError_t _Cellular_LibInit( CellularHandle_t * pCellularHandle,
993993 {
994994 if ( _Cellular_CreatePktRequestMutex ( pContext ) != true )
995995 {
996- CellularLogError ( "Could not create CELLULAR Pkt Req mutex " );
996+ LogError ( ( "Could not create CELLULAR Pkt Req mutex " ) );
997997 cellularStatus = CELLULAR_RESOURCE_CREATION_FAIL ;
998998 }
999999 else
@@ -1006,7 +1006,7 @@ CellularError_t _Cellular_LibInit( CellularHandle_t * pCellularHandle,
10061006 {
10071007 if ( _Cellular_CreatePktResponseMutex ( pContext ) != true )
10081008 {
1009- CellularLogError ( "Could not create CELLULAR Pkt Resp mutex " );
1009+ LogError ( ( "Could not create CELLULAR Pkt Resp mutex " ) );
10101010 cellularStatus = CELLULAR_RESOURCE_CREATION_FAIL ;
10111011 }
10121012 else
0 commit comments