cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F107 RNDIS

gmut.1
Associate

Hello guys,

We have an RNDIS code that we use with STM32F070. We are trying to adapt this code to STM32F107.

However, we could not find the equivalent of the code snippet below in STM32F107. Could you help? (We are using Cubemx.)

 #define RNDIS_CONTROL_OUT_EP                           0x00

 #define RNDIS_CONTROL_IN_EP                            0x80

 #define RNDIS_NOTIFICATION_IN_EP                       0x81

 #define RNDIS_DATA_IN_EP                               0x82

 #define RNDIS_DATA_OUT_EP                              0x03

 #define RNDIS_NOTIFICATION_IN_SZ                       0x0008

 #define RNDIS_DATA_IN_SZ                               0x0040                 //Must be a power of 2

 #define RNDIS_DATA_OUT_SZ                              0x0040

 #define RNDIS_CONTROL_OUT_PMAADDRESS                   0x08 * 4               //8 bytes per EP

 #define RNDIS_CONTROL_IN_PMAADDRESS                    RNDIS_CONTROL_OUT_PMAADDRESS + USB_MAX_EP0_SIZE

 #define RNDIS_NOTIFICATION_IN_PMAADDRESS               RNDIS_CONTROL_IN_PMAADDRESS + USB_MAX_EP0_SIZE

 #define RNDIS_DATA_IN_PMAADDRESS                       RNDIS_NOTIFICATION_IN_PMAADDRESS + RNDIS_NOTIFICATION_IN_SZ

 #define RNDIS_DATA_OUT_PMAADDRESS                      RNDIS_DATA_IN_PMAADDRESS + RNDIS_DATA_IN_SZ

 HAL_PCDEx_PMAConfig(pdev->pData , RNDIS_CONTROL_OUT_EP       , PCD_SNG_BUF, RNDIS_CONTROL_OUT_PMAADDRESS);

 HAL_PCDEx_PMAConfig(pdev->pData , RNDIS_CONTROL_IN_EP        , PCD_SNG_BUF, RNDIS_CONTROL_IN_PMAADDRESS);

 HAL_PCDEx_PMAConfig(pdev->pData , RNDIS_NOTIFICATION_IN_EP   , PCD_SNG_BUF, RNDIS_NOTIFICATION_IN_PMAADDRESS); 

 HAL_PCDEx_PMAConfig(pdev->pData , RNDIS_DATA_OUT_EP          , PCD_SNG_BUF, RNDIS_DATA_OUT_PMAADDRESS);

 HAL_PCDEx_PMAConfig(pdev->pData , RNDIS_DATA_IN_EP           , PCD_SNG_BUF, RNDIS_DATA_IN_PMAADDRESS);

0 REPLIES 0