- /** Type define for a RNDIS Initialize complete response message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t RequestId;\r
- uint32_t Status;\r
- \r
- uint32_t MajorVersion;\r
- uint32_t MinorVersion;\r
- uint32_t DeviceFlags;\r
- uint32_t Medium;\r
- uint32_t MaxPacketsPerTransfer;\r
- uint32_t MaxTransferSize;\r
- uint32_t PacketAlignmentFactor;\r
- uint32_t AFListOffset;\r
- uint32_t AFListSize;\r
- } RNDIS_INITIALIZE_CMPLT_t;\r
- \r
- /** Type define for a RNDIS Keepalive command message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t RequestId;\r
- } RNDIS_KEEPALIVE_MSG_t;\r
-\r
- /** Type define for a RNDIS Keepalive complete message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t RequestId;\r
- uint32_t Status;\r
- } RNDIS_KEEPALIVE_CMPLT_t;\r
-\r
- /** Type define for a RNDIS Reset complete message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t Status;\r
-\r
- uint32_t AddressingReset;\r
- } RNDIS_RESET_CMPLT_t;\r
- \r
- /** Type define for a RNDIS Set command message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t RequestId;\r
- \r
- uint32_t Oid;\r
- uint32_t InformationBufferLength;\r
- uint32_t InformationBufferOffset;\r
- uint32_t DeviceVcHandle;\r
- } RNDIS_SET_MSG_t;\r
-\r
- /** Type define for a RNDIS Set complete response message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t RequestId;\r
- uint32_t Status;\r
- } RNDIS_SET_CMPLT_t;\r
- \r
- /** Type define for a RNDIS Query command message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t RequestId;\r
- \r
- uint32_t Oid;\r
- uint32_t InformationBufferLength;\r
- uint32_t InformationBufferOffset;\r
- uint32_t DeviceVcHandle;\r
- } RNDIS_QUERY_MSG_t;\r
- \r
- /** Type define for a RNDIS Query complete response message */\r
- typedef struct\r
- {\r
- uint32_t MessageType;\r
- uint32_t MessageLength;\r
- uint32_t RequestId;\r
- uint32_t Status;\r
- \r
- uint32_t InformationBufferLength;\r
- uint32_t InformationBufferOffset;\r
- } RNDIS_QUERY_CMPLT_t;\r
-\r
- /** Class state structure. An instance of this structure should be made for each RNDIS interface\r
- * within the user application, and passed to each of the RNDIS class driver functions as the\r
- * RNDISInterfaceInfo parameter. The contents of this structure should be set to their correct\r
- * values when used, or ommitted to force the library to use default values.\r
- */\r
- typedef struct\r
- {\r
- uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */\r
-\r
- uint8_t DataINEndpointNumber; /**< Endpoint number of the CDC interface's IN data endpoint */\r
- uint16_t DataINEndpointSize; /**< Size in bytes of the CDC interface's IN data endpoint */\r
-\r
- uint8_t DataOUTEndpointNumber; /**< Endpoint number of the CDC interface's OUT data endpoint */\r
- uint16_t DataOUTEndpointSize; /**< Size in bytes of the CDC interface's OUT data endpoint */\r
-\r
- uint8_t NotificationEndpointNumber; /**< Endpoint number of the CDC interface's IN notification endpoint, if used */\r
- uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */\r
- \r
- char* AdapterVendorDescription; /**< String description of the adapter vendor */\r
- MAC_Address_t AdapterMACAddress; /**< MAC address of the adapter */\r
-\r
- uint8_t RNDISMessageBuffer[RNDIS_MESSAGE_BUFFER_SIZE]; /**< Buffer to hold RNDIS messages to and from the host,\r
- * managed by the class driver\r
- */\r
- bool ResponseReady; /**< Internal flag indicating if a RNDIS message is waiting to be returned to the host */\r
- uint8_t CurrRNDISState; /**< Current RNDIS state of the adapter, a value from the RNDIS_States_t enum */\r
- uint32_t CurrPacketFilter; /**< Current packet filter mode, used internally by the class driver */\r
- Ethernet_Frame_Info_t FrameIN; /**< Structure holding the last received Ethernet frame from the host, for user\r
- * processing\r
- */\r
- Ethernet_Frame_Info_t FrameOUT; /**< Structure holding the next Ethernet frame to send to the host, populated by the\r
- * user application\r
- */\r
- } USB_ClassInfo_RNDIS_t;\r
- \r
- /* Function Prototypes: */\r
- #if defined(INCLUDE_FROM_RNDIS_CLASS_C)\r
- static void USB_RNDIS_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_t* RNDISInterfaceInfo);\r
- static bool USB_RNDIS_ProcessNDISQuery(USB_ClassInfo_RNDIS_t* RNDISInterfaceInfo, \r
- uint32_t OId, void* QueryData, uint16_t QuerySize,\r
- void* ResponseData, uint16_t* ResponseSize);\r
- static bool USB_RNDIS_ProcessNDISSet(USB_ClassInfo_RNDIS_t* RNDISInterfaceInfo, uint32_t OId,\r
- void* SetData, uint16_t SetSize); \r
+ /* Private Interface - For use in library only: */\r
+ #if !defined(__DOXYGEN__)\r
+ /* Function Prototypes: */\r
+ #if defined(INCLUDE_FROM_RNDIS_CLASS_DEVICE_C)\r
+ static void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)\r
+ ATTR_NON_NULL_PTR_ARG(1);\r
+ static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, \r
+ const uint32_t OId, void* const QueryData, const uint16_t QuerySize,\r
+ void* ResponseData, uint16_t* const ResponseSize) ATTR_NON_NULL_PTR_ARG(1)\r
+ ATTR_NON_NULL_PTR_ARG(5) ATTR_NON_NULL_PTR_ARG(6);\r
+ static bool RNDIS_Device_ProcessNDISSet(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo, const uint32_t OId,\r
+ void* SetData, const uint16_t SetSize) ATTR_NON_NULL_PTR_ARG(1)\r
+ ATTR_NON_NULL_PTR_ARG(3);\r