@@ -873,9 +873,6 @@ HAL_StatusTypeDef HAL_PCD_EP_Open(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint
873
873
{
874
874
ep = & hpcd -> OUT_ep [ep_addr & 0x7FU ];
875
875
}
876
- ep -> num = ep_addr & 0x7FU ;
877
-
878
- ep -> is_in = (0x80U & ep_addr ) != 0U ;
879
876
ep -> maxpacket = ep_mps ;
880
877
ep -> type = ep_type ;
881
878
@@ -903,10 +900,7 @@ HAL_StatusTypeDef HAL_PCD_EP_Close(PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
903
900
{
904
901
ep = & hpcd -> OUT_ep [ep_addr & 0x7FU ];
905
902
}
906
- ep -> num = ep_addr & 0x7FU ;
907
-
908
- ep -> is_in = (0x80U & ep_addr ) != 0U ;
909
-
903
+
910
904
__HAL_LOCK (hpcd );
911
905
USB_DeactivateEndpoint (hpcd -> Instance , ep );
912
906
__HAL_UNLOCK (hpcd );
@@ -932,8 +926,6 @@ HAL_StatusTypeDef HAL_PCD_EP_Receive(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, u
932
926
ep -> xfer_buff = pBuf ;
933
927
ep -> xfer_len = len ;
934
928
ep -> xfer_count = 0U ;
935
- ep -> is_in = 0U ;
936
- ep -> num = ep_addr & 0x7FU ;
937
929
938
930
if ((ep_addr & 0x7FU ) == 0U )
939
931
{
@@ -975,8 +967,6 @@ HAL_StatusTypeDef HAL_PCD_EP_Transmit(PCD_HandleTypeDef *hpcd, uint8_t ep_addr,
975
967
ep -> xfer_buff = pBuf ;
976
968
ep -> xfer_len = len ;
977
969
ep -> xfer_count = 0U ;
978
- ep -> is_in = 1U ;
979
- ep -> num = ep_addr & 0x7FU ;
980
970
981
971
if ((ep_addr & 0x7FU ) == 0U )
982
972
{
@@ -1010,9 +1000,7 @@ HAL_StatusTypeDef HAL_PCD_EP_SetStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
1010
1000
}
1011
1001
1012
1002
ep -> is_stall = 1U ;
1013
- ep -> num = ep_addr & 0x7FU ;
1014
- ep -> is_in = ((ep_addr & 0x80U ) == 0x80U );
1015
-
1003
+
1016
1004
__HAL_LOCK (hpcd );
1017
1005
USB_EPSetStall (hpcd -> Instance , ep );
1018
1006
if ((ep_addr & 0x7FU ) == 0U )
@@ -1044,9 +1032,7 @@ HAL_StatusTypeDef HAL_PCD_EP_ClrStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr)
1044
1032
}
1045
1033
1046
1034
ep -> is_stall = 0U ;
1047
- ep -> num = ep_addr & 0x7FU ;
1048
- ep -> is_in = ((ep_addr & 0x80U ) == 0x80U );
1049
-
1035
+
1050
1036
__HAL_LOCK (hpcd );
1051
1037
USB_EPClearStall (hpcd -> Instance , ep );
1052
1038
__HAL_UNLOCK (hpcd );
0 commit comments