| // Copyright 2018 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // WARNING: This file is machine generated by fidlc. |
| |
| #pragma once |
| |
| #include <ddk/protocol/nand.h> |
| #include <fbl/type_support.h> |
| |
| namespace ddk { |
| namespace internal { |
| |
| DECLARE_HAS_MEMBER_FN_WITH_SIGNATURE(has_nand_protocol_query, NandQuery, |
| void (C::*)(nand_info_t* out_info, size_t* out_nand_op_size)); |
| DECLARE_HAS_MEMBER_FN_WITH_SIGNATURE(has_nand_protocol_queue, NandQueue, |
| void (C::*)(nand_operation_t* op, nand_queue_callback callback, |
| void* cookie)); |
| DECLARE_HAS_MEMBER_FN_WITH_SIGNATURE(has_nand_protocol_get_factory_bad_block_list, |
| NandGetFactoryBadBlockList, |
| zx_status_t (C::*)(uint32_t* out_bad_blocks_list, |
| size_t bad_blocks_count, |
| size_t* out_bad_blocks_actual)); |
| |
| template <typename D> |
| constexpr void CheckNandProtocolSubclass() { |
| static_assert(internal::has_nand_protocol_query<D>::value, |
| "NandProtocol subclasses must implement " |
| "void NandQuery(nand_info_t* out_info, size_t* out_nand_op_size"); |
| static_assert( |
| internal::has_nand_protocol_queue<D>::value, |
| "NandProtocol subclasses must implement " |
| "void NandQueue(nand_operation_t* op, nand_queue_callback callback, void* cookie"); |
| static_assert(internal::has_nand_protocol_get_factory_bad_block_list<D>::value, |
| "NandProtocol subclasses must implement " |
| "zx_status_t NandGetFactoryBadBlockList(uint32_t* out_bad_blocks_list, size_t " |
| "bad_blocks_count, size_t* out_bad_blocks_actual"); |
| } |
| |
| } // namespace internal |
| } // namespace ddk |