Austin Schuh | 41baf20 | 2022-01-01 14:33:40 -0800 | [diff] [blame^] | 1 | /* |
| 2 | * The MIT License (MIT) |
| 3 | * |
| 4 | * Copyright (c) 2021, Ha Thach (tinyusb.org) |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | * of this software and associated documentation files (the "Software"), to deal |
| 8 | * in the Software without restriction, including without limitation the rights |
| 9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | * copies of the Software, and to permit persons to whom the Software is |
| 11 | * furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in |
| 14 | * all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | * THE SOFTWARE. |
| 23 | * |
| 24 | * This file is part of the TinyUSB stack. |
| 25 | */ |
| 26 | |
| 27 | |
| 28 | #ifndef _TUSB_NCM_H_ |
| 29 | #define _TUSB_NCM_H_ |
| 30 | |
| 31 | #include "common/tusb_common.h" |
| 32 | |
| 33 | #ifdef __cplusplus |
| 34 | extern "C" { |
| 35 | #endif |
| 36 | |
| 37 | // Table 4.3 Data Class Interface Protocol Codes |
| 38 | typedef enum |
| 39 | { |
| 40 | NCM_DATA_PROTOCOL_NETWORK_TRANSFER_BLOCK = 0x01 |
| 41 | } ncm_data_interface_protocol_code_t; |
| 42 | |
| 43 | |
| 44 | // Table 6.2 Class-Specific Request Codes for Network Control Model subclass |
| 45 | typedef enum |
| 46 | { |
| 47 | NCM_SET_ETHERNET_MULTICAST_FILTERS = 0x40, |
| 48 | NCM_SET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER = 0x41, |
| 49 | NCM_GET_ETHERNET_POWER_MANAGEMENT_PATTERN_FILTER = 0x42, |
| 50 | NCM_SET_ETHERNET_PACKET_FILTER = 0x43, |
| 51 | NCM_GET_ETHERNET_STATISTIC = 0x44, |
| 52 | NCM_GET_NTB_PARAMETERS = 0x80, |
| 53 | NCM_GET_NET_ADDRESS = 0x81, |
| 54 | NCM_SET_NET_ADDRESS = 0x82, |
| 55 | NCM_GET_NTB_FORMAT = 0x83, |
| 56 | NCM_SET_NTB_FORMAT = 0x84, |
| 57 | NCM_GET_NTB_INPUT_SIZE = 0x85, |
| 58 | NCM_SET_NTB_INPUT_SIZE = 0x86, |
| 59 | NCM_GET_MAX_DATAGRAM_SIZE = 0x87, |
| 60 | NCM_SET_MAX_DATAGRAM_SIZE = 0x88, |
| 61 | NCM_GET_CRC_MODE = 0x89, |
| 62 | NCM_SET_CRC_MODE = 0x8A, |
| 63 | } ncm_request_code_t; |
| 64 | |
| 65 | #ifdef __cplusplus |
| 66 | } |
| 67 | #endif |
| 68 | |
| 69 | #endif |