UM0290
e)
f)
g)
3.
Buffer description table functions: These functions are used to set or get the
endpoints' receive and transmit buffer addresses and sizes.
a)
b)
Clear_Status_Out :
bEpNum = endpoint number
SetEPDoubleBuff
ClearEPDoubleBuff :
bEpNum = endpoint number
Correct Transfer Rx/Tx fields
ClearEP_CTR_RX :
ClearEP_CTR_TX :
bEpNum = endpoint number
Data Toggle Rx/Tx fields
ToggleDTOG_RX :
void ToggleDTOG_RX(u8 bEpNum)
ToggleDTOG_TX :
void ToggleDTOG_TX(u8 bEpNum)
bEpNum = endpoint number
Address field
SetEPAdress :
void SetEPAddress(u8 bEpNum,u8 bAddr)
bEpNum = endpoint number
bAddr
= address to be set
GetEPAdress :
BYTE GetEPAddress(u8 bEpNum)
bEpNum = endpoint number
Tx/Rx buffer address fields
SetEPTxAddr : void SetEPTxAddr(u8 bEpNum,u16 wAddr);
SetEPRxAddr : void SetEPRxAddr(u8 bEpNum,u16 wAddr);
bEpNum = endpoint number
wAddr
= address to be set (expressed as PMA buffer address)
GetEPTxAddr : u16 GetEPTxAddr(u8 bEpNum);
GetEPRxAddr : u16 GetEPRxAddr(u8 bEpNum);
bEpNum = endpoint number
return value : address value (expressed as PMA buffer address)
Tx/Rx buffer counter fields
SetEPTxCount : void SetEPTxCount(u8 bEpNum,u16 wCount);
SetEPRxCount : void SetEPRxCount(u8 bEpNum,u16 wCount);
bEpNum = endpoint number
wCount = counter to be set
GetEPTxCount : u16 GetEPTxCount(u8 bEpNum);
GetEPRxCount : u16 GetEPRxCount(u8 bEpNum);
bEpNum = endpoint number
return value : counter value
void Clear_Status_Out(u8 bEpNum)
:
void SetEPDoubleBuff(u8 bEpNum)
void ClearEPDoubleBuff(u8 bEpNum)
void ClearEP_CTR_RX(u8 bEpNum)
void ClearEP_CTR_TX(u8 bEpNum)
STR7/STR9 USB firmware library
9/76
Need help?
Do you have a question about the STR9 and is the answer not in the manual?