blob: 13fc33a2b2bf3e119f51c5a21033f854a921077c [file] [log] [blame]
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "libec/get_protocol_info_command.h"
namespace ec {
uint16_t GetProtocolInfoCommand::MaxReadBytes() const {
return Resp()->max_response_packet_size - sizeof(struct ec_host_response);
}
uint16_t GetProtocolInfoCommand::MaxWriteBytes() const {
// TODO(vpalatin): workaround for b/78544921, can be removed if MCU is fixed.
return Resp()->max_request_packet_size - sizeof(struct ec_host_request) - 4;
}
} // namespace ec