blob: 15f74ce59d3a4771ed7a7b6693ed61a75726866b [file] [log] [blame]
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// 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