Subversion Repositories FuelGauge

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 6
Line 58... Line 58...
58
  uint32_t dev_endpoints;           /*!< Device Endpoints number.
58
  uint32_t dev_endpoints;           /*!< Device Endpoints number.
59
                                         This parameter depends on the used USB core.
59
                                         This parameter depends on the used USB core.
60
                                         This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
60
                                         This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
61
 
61
 
62
  uint32_t speed;                   /*!< USB Core speed.
62
  uint32_t speed;                   /*!< USB Core speed.
63
                                         This parameter can be any value of @ref USB_Core_Speed                 */
63
                                         This parameter can be any value of @ref PCD_Speed/HCD_Speed
-
 
64
                                                                                 (HCD_SPEED_xxx, HCD_SPEED_xxx) */
64
 
65
 
65
  uint32_t ep0_mps;                 /*!< Set the Endpoint 0 Max Packet size.                                    */
66
  uint32_t ep0_mps;                 /*!< Set the Endpoint 0 Max Packet size.                                    */
66
 
67
 
67
  uint32_t phy_itface;              /*!< Select the used PHY interface.
68
  uint32_t phy_itface;              /*!< Select the used PHY interface.
68
                                         This parameter can be any value of @ref USB_Core_PHY                   */
69
                                         This parameter can be any value of @ref PCD_PHY_Module/HCD_PHY_Module  */
69
 
70
 
70
  uint32_t Sof_enable;              /*!< Enable or disable the output of the SOF signal.                        */
71
  uint32_t Sof_enable;              /*!< Enable or disable the output of the SOF signal.                        */
71
 
72
 
72
  uint32_t low_power_enable;        /*!< Enable or disable Low Power mode                                       */
73
  uint32_t low_power_enable;        /*!< Enable or disable Low Power mode                                       */
73
 
74
 
Line 116... Line 117...
116
 
117
 
117
  uint32_t  xfer_len;        /*!< Current transfer length                                                   */
118
  uint32_t  xfer_len;        /*!< Current transfer length                                                   */
118
 
119
 
119
  uint32_t  xfer_count;      /*!< Partial transfer length in case of multi packet transfer                  */
120
  uint32_t  xfer_count;      /*!< Partial transfer length in case of multi packet transfer                  */
120
 
121
 
-
 
122
  uint32_t  xfer_len_db;      /*!< double buffer transfer length used with bulk double buffer in           */
-
 
123
 
-
 
124
  uint8_t   xfer_fill_db;     /*!< double buffer Need to Fill new buffer  used with bulk_in                */
-
 
125
 
121
} USB_EPTypeDef;
126
} USB_EPTypeDef;
122
 
127
 
123
 
128
 
124
/* Exported constants --------------------------------------------------------*/
129
/* Exported constants --------------------------------------------------------*/
125
 
130
 
Line 129... Line 134...
129
 
134
 
130
 
135
 
131
/** @defgroup USB_LL_EP0_MPS USB Low Layer EP0 MPS
136
/** @defgroup USB_LL_EP0_MPS USB Low Layer EP0 MPS
132
  * @{
137
  * @{
133
  */
138
  */
134
#define DEP0CTL_MPS_64                         0U
139
#define EP_MPS_64                              0U
135
#define DEP0CTL_MPS_32                         1U
140
#define EP_MPS_32                              1U
136
#define DEP0CTL_MPS_16                         2U
141
#define EP_MPS_16                              2U
137
#define DEP0CTL_MPS_8                          3U
142
#define EP_MPS_8                               3U
138
/**
143
/**
139
  * @}
144
  * @}
140
  */
145
  */
141
 
146
 
142
/** @defgroup USB_LL_EP_Type USB Low Layer EP Type
147
/** @defgroup USB_LL_EP_Type USB Low Layer EP Type
Line 181... Line 186...
181
HAL_StatusTypeDef USB_CoreInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg);
186
HAL_StatusTypeDef USB_CoreInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg);
182
HAL_StatusTypeDef USB_DevInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg);
187
HAL_StatusTypeDef USB_DevInit(USB_TypeDef *USBx, USB_CfgTypeDef cfg);
183
HAL_StatusTypeDef USB_EnableGlobalInt(USB_TypeDef *USBx);
188
HAL_StatusTypeDef USB_EnableGlobalInt(USB_TypeDef *USBx);
184
HAL_StatusTypeDef USB_DisableGlobalInt(USB_TypeDef *USBx);
189
HAL_StatusTypeDef USB_DisableGlobalInt(USB_TypeDef *USBx);
185
HAL_StatusTypeDef USB_SetCurrentMode(USB_TypeDef *USBx, USB_ModeTypeDef mode);
190
HAL_StatusTypeDef USB_SetCurrentMode(USB_TypeDef *USBx, USB_ModeTypeDef mode);
186
HAL_StatusTypeDef USB_SetDevSpeed(USB_TypeDef *USBx, uint8_t speed);
-
 
-
 
191
 
187
HAL_StatusTypeDef USB_FlushRxFifo(USB_TypeDef *USBx);
192
#if defined (HAL_PCD_MODULE_ENABLED)
188
HAL_StatusTypeDef USB_FlushTxFifo(USB_TypeDef *USBx, uint32_t num);
-
 
189
HAL_StatusTypeDef USB_ActivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep);
193
HAL_StatusTypeDef USB_ActivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep);
190
HAL_StatusTypeDef USB_DeactivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep);
194
HAL_StatusTypeDef USB_DeactivateEndpoint(USB_TypeDef *USBx, USB_EPTypeDef *ep);
191
HAL_StatusTypeDef USB_EPStartXfer(USB_TypeDef *USBx, USB_EPTypeDef *ep);
195
HAL_StatusTypeDef USB_EPStartXfer(USB_TypeDef *USBx, USB_EPTypeDef *ep);
192
HAL_StatusTypeDef USB_WritePacket(USB_TypeDef *USBx, uint8_t *src, uint8_t ch_ep_num, uint16_t len);
-
 
193
void             *USB_ReadPacket(USB_TypeDef *USBx, uint8_t *dest, uint16_t len);
-
 
194
HAL_StatusTypeDef USB_EPSetStall(USB_TypeDef *USBx, USB_EPTypeDef *ep);
196
HAL_StatusTypeDef USB_EPSetStall(USB_TypeDef *USBx, USB_EPTypeDef *ep);
195
HAL_StatusTypeDef USB_EPClearStall(USB_TypeDef *USBx, USB_EPTypeDef *ep);
197
HAL_StatusTypeDef USB_EPClearStall(USB_TypeDef *USBx, USB_EPTypeDef *ep);
-
 
198
#endif /* defined (HAL_PCD_MODULE_ENABLED) */
-
 
199
 
196
HAL_StatusTypeDef USB_SetDevAddress(USB_TypeDef *USBx, uint8_t address);
200
HAL_StatusTypeDef USB_SetDevAddress(USB_TypeDef *USBx, uint8_t address);
197
HAL_StatusTypeDef USB_DevConnect(USB_TypeDef *USBx);
201
HAL_StatusTypeDef USB_DevConnect(USB_TypeDef *USBx);
198
HAL_StatusTypeDef USB_DevDisconnect(USB_TypeDef *USBx);
202
HAL_StatusTypeDef USB_DevDisconnect(USB_TypeDef *USBx);
199
HAL_StatusTypeDef USB_StopDevice(USB_TypeDef *USBx);
203
HAL_StatusTypeDef USB_StopDevice(USB_TypeDef *USBx);
200
HAL_StatusTypeDef USB_EP0_OutStart(USB_TypeDef *USBx, uint8_t *psetup);
-
 
201
uint32_t          USB_ReadInterrupts(USB_TypeDef *USBx);
204
uint32_t          USB_ReadInterrupts(USB_TypeDef *USBx);
202
uint32_t          USB_ReadDevAllOutEpInterrupt(USB_TypeDef *USBx);
-
 
203
uint32_t          USB_ReadDevOutEPInterrupt(USB_TypeDef *USBx, uint8_t epnum);
-
 
204
uint32_t          USB_ReadDevAllInEpInterrupt(USB_TypeDef *USBx);
-
 
205
uint32_t          USB_ReadDevInEPInterrupt(USB_TypeDef *USBx, uint8_t epnum);
-
 
206
void              USB_ClearInterrupts(USB_TypeDef *USBx, uint32_t interrupt);
-
 
207
 
-
 
208
HAL_StatusTypeDef USB_ActivateRemoteWakeup(USB_TypeDef *USBx);
205
HAL_StatusTypeDef USB_ActivateRemoteWakeup(USB_TypeDef *USBx);
209
HAL_StatusTypeDef USB_DeActivateRemoteWakeup(USB_TypeDef *USBx);
206
HAL_StatusTypeDef USB_DeActivateRemoteWakeup(USB_TypeDef *USBx);
-
 
207
 
-
 
208
void              USB_WritePMA(USB_TypeDef *USBx, uint8_t *pbUsrBuf,
210
void USB_WritePMA(USB_TypeDef  *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes);
209
                               uint16_t wPMABufAddr, uint16_t wNBytes);
-
 
210
 
-
 
211
void              USB_ReadPMA(USB_TypeDef *USBx, uint8_t *pbUsrBuf,
211
void USB_ReadPMA(USB_TypeDef  *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes);
212
                              uint16_t wPMABufAddr, uint16_t wNBytes);
212
 
213
 
213
/**
214
/**
214
  * @}
215
  * @}
215
  */
216
  */
216
 
217