/* Sends a RNDIS KEEPALIVE command to the device, to ensure that it does not enter standby mode after periods of long inactivity. */
uint8_t RNDIS_SendKeepAlive(void)
/* Sends a RNDIS KEEPALIVE command to the device, to ensure that it does not enter standby mode after periods of long inactivity. */
uint8_t RNDIS_SendKeepAlive(void)
{
	uint8_t ErrorCode;
	RNDIS_KeepAlive_Message_t  KeepAliveMessage;
	RNDIS_KeepAlive_Complete_t KeepAliveMessageResponse;
	KeepAliveMessage.MessageType     = REMOTE_NDIS_KEEPALIVE_MSG;
	KeepAliveMessage.MessageLength   = sizeof(RNDIS_KeepAlive_Message_t);
	KeepAliveMessage.RequestId       = RequestID++;
	if ((ErrorCode = RNDIS_SendEncapsulatedCommand(&KeepAliveMessage,
	                                               sizeof(RNDIS_KeepAlive_Message_t))) != HOST_SENDCONTROL_Successful)
	{
		return ErrorCode;
	}
	if ((ErrorCode = RNDIS_GetEncapsulatedResponse(&KeepAliveMessageResponse,
	                                               sizeof(RNDIS_KeepAlive_Complete_t))) != HOST_SENDCONTROL_Successful)
	{
		return ErrorCode;
	}
	return HOST_SENDCONTROL_Successful;
}