Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -r38355442b06187fe5d57deca647b3adf2fa26b89 -r60c102696e521ff82452aaad30e1db9f240eef58 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 38355442b06187fe5d57deca647b3adf2fa26b89) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 60c102696e521ff82452aaad30e1db9f240eef58) @@ -440,9 +440,9 @@ * @details Outputs: confirmRequests[] status updated if timeout. * @return none *************************************************************************/ -void updateConfirmationRequestTimeouts( void ) +static void updateConfirmationRequestTimeouts( void ) { - U08 i; + U32 i; for ( i = 0; i < MAX_PENDING_CONFIRM_REQUESTS; i++ ) { @@ -461,22 +461,22 @@ * The getConfirmationRequestStatus function returns the status of a confirmation request * @details Inputs: confirmRequests[] * @details Outputs: confirmRequests[] consumed/cleared if completed. - * @param request_id ID of confirmation being requested + * @param requestID ID of confirmation being requested * @return Status of given confirmation *************************************************************************/ -CONFIRMATION_REQUEST_STATUS_T getConfirmationRequestStatus( GENERIC_CONFIRM_ID_T request_id ) +CONFIRMATION_REQUEST_STATUS_T getConfirmationRequestStatus( GENERIC_CONFIRM_ID_T requestID ) { - U08 i; + BOOL pending = FALSE; + U32 pendingIndex = 0; CONFIRMATION_REQUEST_STATUS_T status = CONFIRMATION_REQUEST_STATUS_PENDING; - BOOL pending = FALSE; - U08 pending_index = 0; + U32 i; for ( i = 0; i < MAX_PENDING_CONFIRM_REQUESTS; i++ ) { - if ( confirmRequests[ i ].requestID == request_id ) + if ( confirmRequests[ i ].requestID == requestID ) { status = confirmRequests[ i ].status; - if ( CONFIRMATION_REQUEST_STATUS_PENDING != status ) + if ( status != CONFIRMATION_REQUEST_STATUS_PENDING ) { // Send UI clear if ( CONFIRMATION_REQUEST_STATUS_TIMEOUT == status ) @@ -500,23 +500,23 @@ if ( TRUE == pending ) { // Is this newer than other pending request? - if ( confirmRequests[ i ].timeStamp > confirmRequests[ pending_index ].timeStamp ) + if ( confirmRequests[ i ].timeStamp > confirmRequests[ pendingIndex ].timeStamp ) { - pending_index = i; - pending = TRUE; + pendingIndex = i; } } else { - pending_index = i; + pendingIndex = i; pending = TRUE; } } } + if ( ( CONFIRMATION_REQUEST_STATUS_PENDING != status ) && ( TRUE == pending ) ) { // Last confirmation cleared, pending request must be resent to UI - sendConfirmationRequest( confirmRequests[ pending_index ].requestID, confirmRequests[ pending_index ].requestType, 0 ); + sendConfirmationRequest( confirmRequests[ pendingIndex ].requestID, confirmRequests[ pendingIndex ].requestType, 0 ); } return status; @@ -527,17 +527,17 @@ * The setConfirmationRequestStatus function sets the status of a confirmation request * @details Inputs: confirmRequests[] * @details Outputs: confirmRequests[]. - * @param request_id ID of confirmation being requested + * @param requestID ID of confirmation being requested * @param status Status to set for given confirmation (open, close, reject) * @return none *************************************************************************/ -void setConfirmationRequestStatus( GENERIC_CONFIRM_ID_T request_id, CONFIRMATION_REQUEST_STATUS_T status ) +void setConfirmationRequestStatus( GENERIC_CONFIRM_ID_T requestID, CONFIRMATION_REQUEST_STATUS_T status ) { - U08 i; + U32 i; for ( i = 0; i < MAX_PENDING_CONFIRM_REQUESTS; i++ ) { - if ( confirmRequests[ i ].requestID == request_id ) + if ( confirmRequests[ i ].requestID == requestID ) { confirmRequests[ i ].status = status; break; @@ -550,32 +550,32 @@ * The addConfirmationRequest function sends a confirmation request to UI * @details Inputs: confirmRequests[] * @details Outputs: confirmRequests[] new added. - * @param request_id ID of confirmation being requested - * @param request_type Type of confirmation being requested (open, close, reject) - * @param reject_Reason Reason for reject if type is reject + * @param requestID ID of confirmation being requested + * @param requestType Type of confirmation being requested (open, close, reject) + * @param rejectReason Reason for reject if type is reject * @return request ID - will be non-zero if added *************************************************************************/ -GENERIC_CONFIRM_ID_T addConfirmationRequest( GENERIC_CONFIRM_ID_T request_id, GENERIC_CONFIRM_COMMAND_T request_type, U32 reject_reason ) +GENERIC_CONFIRM_ID_T addConfirmationRequest( GENERIC_CONFIRM_ID_T requestID, GENERIC_CONFIRM_COMMAND_T requestType, U32 rejectReason ) { - U08 i; - GENERIC_CONFIRM_ID_T new_id = GENERIC_CONFIRM_ID_NONE; + U32 i; + GENERIC_CONFIRM_ID_T newID = GENERIC_CONFIRM_ID_NONE; for ( i = 0; i < MAX_PENDING_CONFIRM_REQUESTS; i++ ) { if ( CONFIRMATION_REQUEST_STATUS_UNUSED == confirmRequests[ i ].status ) { // Save the confirmation request info - confirmRequests[ i ].requestID = request_id; - confirmRequests[ i ].requestType = request_type; + confirmRequests[ i ].requestID = requestID; + confirmRequests[ i ].requestType = requestType; confirmRequests[ i ].timeStamp = getMSTimerCount(); confirmRequests[ i ].status = CONFIRMATION_REQUEST_STATUS_PENDING; - new_id = request_id; - sendConfirmationRequest( request_id, request_type, reject_reason ); + newID = requestID; + sendConfirmationRequest( requestID, requestType, rejectReason ); break; } } - return new_id; + return newID; } /*********************************************************************//**