| Electronic Components Datasheet Search |
|
UM0290 Datasheet(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0290 Datasheet(HTML) 8 Page - STMicroelectronics |
|
8 / 76 page ![]() STR7/STR9 USB firmware library UM0290 8/76 2. Endpoint register functions: All operations related to endpoint registers can be performed with the SetENDPOINT and GetENDPOINT functions. However, several functions are derived from these to permit direct action on a specific field. a) Endpoint set/get value SetENDPOINT : void SetENDPOINT(u8 bEpNum,u16 wRegValue) bEpNum = Endpoint number, wRegValue = Value to write GetENDPOINT : u16 GetENDPOINT(u8 bEpNum) bEpNum = Endpoint number return value: the endpoint register value b) Endpoint TYPE field The EP_TYPE field of the endpoint register could have these defined values: #define EP_BULK (0x0000) // Endpoint BULK #define EP_CONTROL (0x0200) // Endpoint CONTROL #define EP_ISOCHRNOUS (0x0400) // Endpoint ISOCHRONOUS #define EP_INTERRUPT (0x0600) // Endpoint INTERRUPT SetEPType : void SetEPType (u8 bEpNum, u16 wtype) bEpNum = Endpoint number, wtype = Endpoint type (value from the above define’s) GetEPType : u16 GetEPType (u8 bEpNum) bEpNum = Endpoint number return value: a value from the above define’s c) Endpoint STATUS field The STAT_TX / STAT_RX fields of the endpoint register could have these defined values: #define EP_TX_DIS (0x0000) // Endpoint TX DISabled #define EP_TX_STALL (0x0010) // Endpoint TX STALLed #define EP_TX_NAK (0x0020) // Endpoint TX NAKed #define EP_TX_VALID (0x0030) // Endpoint TX VALID #define EP_RX_DIS (0x0000) // Endpoint RX DISabled #define EP_RX_STALL (0x1000) // Endpoint RX STALLed #define EP_RX_NAK (0x2000) // Endpoint RX NAKed #define EP_RX_VALID (0x3000) // Endpoint RX VALID SetEPTxStatus : void SetEPTxStatus(u8 bEpNum,u16 wState) SetEPRxStatus : void SetEPRxStatus(u8 bEpNum,u16 wState) bEpNum = Endpoint number, wState = a value from the above define’s GetEPTxStatus : u16 GetEPTxStatus(u8 bEpNum) GetEPRxStatus : u16 GetEPRxStatus(u8 bEpNum) bEpNum = endpoint number return value:a value from the above define’s d) Endpoint KIND field SetEP_KIND : void SetEP_KIND(u8 bEpNum) ClearEP_KIND : void ClearEP_KIND(u8 bEpNum) bEpNum = endpoint number Set_Status_Out : void Set_Status_Out(u8 bEpNum) |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |