Socket APIs
|
These are functions to access socket registers. More...
Macros | |
#define | setSn_MR(sn, mr) WIZCHIP_WRITE(Sn_MR(sn),mr) |
Set Sn_MR register. More... | |
#define | getSn_MR(sn) WIZCHIP_READ(Sn_MR(sn)) |
Get Sn_MR register. More... | |
#define | setSn_CR(sn, cr) WIZCHIP_WRITE(Sn_CR(sn), ((uint16_t)cr) & 0x00FF) |
Set Sn_CR register. More... | |
#define | getSn_CR(sn) ((uint8_t)WIZCHIP_READ(Sn_CR(sn))) |
Get Sn_CR register. More... | |
#define | setSn_IMR(sn, imr) WIZCHIP_WRITE(Sn_IMR(sn), ((uint16_t)imr) & 0x00FF) |
Set Sn_IMR register. More... | |
#define | getSn_IMR(sn) ((uint8_t)WIZCHIP_READ(Sn_IMR(sn))) |
Get Sn_IMR register. More... | |
#define | setSn_IR(sn, ir) WIZCHIP_WRITE(Sn_IR(sn), ((uint16_t)ir) & 0x00FF) |
Set Sn_IR register. More... | |
#define | getSn_IR(sn) ((uint8_t)WIZCHIP_READ(Sn_IR(sn))) |
Get Sn_IR register. More... | |
#define | getSn_SSR(sn) ((uint8_t)WIZCHIP_READ(Sn_SR(sn))) |
Get Sn_SR register. More... | |
#define | setSn_PORTR(sn, port) WIZCHIP_WRITE(Sn_PORTR(sn), port) |
Set Sn_PORTR register. More... | |
#define | getSn_PORTR(sn, port) WIZCHIP_READ(Sn_PORTR(sn)) |
Get Sn_PORTR register. More... | |
#define | setSn_DHAR(sn, dhar) |
Set Sn_DHAR register. More... | |
#define | getSn_DHAR(sn, dhar) |
Get Sn_MR register. More... | |
#define | setSn_DPORTR(sn, dport) WIZCHIP_WRITE(Sn_DPORTR(sn),dport) |
Set Sn_DPORT register. More... | |
#define | getSn_DPORTR(sn) WIZCHIP_READ(Sn_DPORTR(sn)) |
Get Sn_DPORT register. More... | |
#define | setSn_DIPR(sn, dipr) |
Set Sn_DIPR register. More... | |
#define | getSn_DIPR(sn, dipr) |
Get Sn_DIPR register. More... | |
#define | setSn_MSSR(sn, mss) WIZCHIP_WRITE(Sn_MSSR(sn), mss) |
Set Sn_MSSR register. More... | |
#define | getSn_MSSR(sn) WIZCHIP_READ(Sn_MSSR(sn)) |
Get Sn_MSSR register. More... | |
#define | setSn_KPALVTR(sn, kpalvt) WIZCHIP_WRITE(Sn_KPALVTR(sn), (WIZCHIP_READ(Sn_KPALVTR(sn)) & 0x00FF) | (((uint16_t)kpalvt)<<8)) |
Set Sn_KPALVTR register. More... | |
#define | getSn_KPALVTR(sn) ((uint8_t)(WIZCHIP_READ(Sn_KPALVTR(sn)) >> 8)) |
Get Sn_KPALVTR register. More... | |
#define | setSn_PROTOR(sn, proto) WIZCHIP_WRITE(Sn_PROTOR(sn),(WIZCHIP_READ(Sn_PROTOR(sn) & 0xFF00) | (((uint16_t)proto) & 0x00FF)) |
Set Sn_PROTOR register. More... | |
#define | getSn_PROTOR(sn) ((uint8_t)WIZCHIP_READ(Sn_PROTOR(sn))) |
Get Sn_PROTOR register. More... | |
#define | setSn_TX_WRSR(sn, txwrs) |
Set Sn_TX_WRSR register. More... | |
#define | getSn_TX_WRSR(sn) ( (((uint32_t)WIZCHIP_READ(Sn_TX_WRSR(sn))) << 16) + (((uint32_t)WIZCHIP_READ(WIZCHIP_OFFSET_INC(Sn_TX_WRSR(sn),1))) & 0x0000FFFF) ) |
Get Sn_TX_WRSR register. More... | |
#define | setSn_TX_FIFOR(sn, txfifo) WIZCHIP_WRITE(Sn_TX_FIFOR(sn), txfifo); |
Set Sn_TX_FIFOR register. More... | |
#define | getSn_RX_FIFOR(sn) WIZCHIP_READ(Sn_RX_FIFOR(sn)); |
Get Sn_RX_FIFOR register. More... | |
#define | setSn_TOSR(sn, tos) WIZCHIP_WRITE(Sn_TOS(sn), ((uint16_t)tos) & 0x00FF) |
Set Sn_TOSR register. More... | |
#define | getSn_TOSR(sn) ((uint8_t)WIZCHIP_READ(Sn_TOSR(sn))) |
Get Sn_TOSR register. More... | |
#define | setSn_TTLR(sn, ttl) WIZCHIP_WRITE(Sn_TTLR(sn), ((uint16_t)ttl) & 0x00FF) |
Set Sn_TTLR register. More... | |
#define | getSn_TTLR(sn) ((uint8_t)WIZCHIP_READ(Sn_TTL(sn))) |
Get Sn_TTLR register. More... | |
#define | setSn_FRAGR(sn, frag) WIZCHIP_WRITE(Sn_FRAGR(sn), (uint16_t)(frag >>8)) |
Set Sn_FRAGR register. More... | |
#define | getSn_FRAGR(sn) (WIZCHIP_READ(Sn_FRAG(sn)) << 8) |
Get Sn_FRAGR register. More... | |
Functions | |
uint32_t | getSn_TX_FSR (uint8_t sn) |
Get Sn_TX_FSR register. More... | |
uint32_t | getSn_RX_RSR (uint8_t sn) |
Get Sn_RX_RSR register. More... | |
Detailed Description
These are functions to access socket registers.
Macro Definition Documentation
#define setSn_MR | ( | sn, | |
mr | |||
) | WIZCHIP_WRITE(Sn_MR(sn),mr) |
Set Sn_MR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t)mr Value to set Sn_MR
- See also
- getSn_MR()
#define getSn_MR | ( | sn | ) | WIZCHIP_READ(Sn_MR(sn)) |
Get Sn_MR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint8_t. Value of Sn_MR.
- See also
- setSn_MR()
#define setSn_CR | ( | sn, | |
cr | |||
) | WIZCHIP_WRITE(Sn_CR(sn), ((uint16_t)cr) & 0x00FF) |
Set Sn_CR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t)cr Value to set Sn_CR
- See also
- getSn_CR()
#define getSn_CR | ( | sn | ) | ((uint8_t)WIZCHIP_READ(Sn_CR(sn))) |
Get Sn_CR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint8_t. Value of Sn_CR.
- See also
- setSn_CR()
#define setSn_IMR | ( | sn, | |
imr | |||
) | WIZCHIP_WRITE(Sn_IMR(sn), ((uint16_t)imr) & 0x00FF) |
Set Sn_IMR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t)imr Value to set Sn_IMR
- See also
- getSn_IMR()
#define getSn_IMR | ( | sn | ) | ((uint8_t)WIZCHIP_READ(Sn_IMR(sn))) |
Get Sn_IMR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint8_t. Value of Sn_IMR.
- See also
- setSn_IMR()
#define setSn_IR | ( | sn, | |
ir | |||
) | WIZCHIP_WRITE(Sn_IR(sn), ((uint16_t)ir) & 0x00FF) |
Set Sn_IR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t)ir Value to set Sn_IR
- See also
- getSn_IR()
#define getSn_IR | ( | sn | ) | ((uint8_t)WIZCHIP_READ(Sn_IR(sn))) |
Get Sn_IR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint8_t. Value of Sn_IR.
- See also
- setSn_IR()
#define getSn_SSR | ( | sn | ) | ((uint8_t)WIZCHIP_READ(Sn_SR(sn))) |
#define setSn_PORTR | ( | sn, | |
port | |||
) | WIZCHIP_WRITE(Sn_PORTR(sn), port) |
#define getSn_PORTR | ( | sn, | |
port | |||
) | WIZCHIP_READ(Sn_PORTR(sn)) |
Get Sn_PORTR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint16_t. Variable of Sn_PORTR.
- See also
- setSn_PORTR()
#define setSn_DHAR | ( | sn, | |
dhar | |||
) |
Set Sn_DHAR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t*)dhar Pointer variable to set socket n destination hardware address. It should be allocated 6 bytes.
- See also
- getSn_DHAR()
#define getSn_DHAR | ( | sn, | |
dhar | |||
) |
Get Sn_MR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t*)dhar Pointer variable to get socket n destination hardware address. It should be allocated 6 bytes.
- See also
- setSn_DHAR()
#define setSn_DPORTR | ( | sn, | |
dport | |||
) | WIZCHIP_WRITE(Sn_DPORTR(sn),dport) |
Set Sn_DPORT register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint16_t)dport Value to set Sn_DPORT
- See also
- getSn_DPORT()
#define getSn_DPORTR | ( | sn | ) | WIZCHIP_READ(Sn_DPORTR(sn)) |
#define setSn_DIPR | ( | sn, | |
dipr | |||
) |
Set Sn_DIPR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t*)dipr Pointer variable to set socket n destination IP address. It should be allocated 4 bytes.
- See also
- getSn_DIPR()
#define getSn_DIPR | ( | sn, | |
dipr | |||
) |
Get Sn_DIPR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t*)dipr Pointer variable to get socket n destination IP address. It should be allocated 4 bytes.
- See also
- setSn_DIPR()
#define setSn_MSSR | ( | sn, | |
mss | |||
) | WIZCHIP_WRITE(Sn_MSSR(sn), mss) |
Set Sn_MSSR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint16_t)mss Value to set Sn_MSSR
- See also
- setSn_MSSR()
#define getSn_MSSR | ( | sn | ) | WIZCHIP_READ(Sn_MSSR(sn)) |
Get Sn_MSSR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint16_t. Value of Sn_MSSR.
- See also
- setSn_MSSR()
#define setSn_KPALVTR | ( | sn, | |
kpalvt | |||
) | WIZCHIP_WRITE(Sn_KPALVTR(sn), (WIZCHIP_READ(Sn_KPALVTR(sn)) & 0x00FF) | (((uint16_t)kpalvt)<<8)) |
Set Sn_KPALVTR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t)kpalvt Value to set Sn_KPALVTR
- See also
- getSn_KPALVTR()
Definition at line 2102 of file w5300.h.
Referenced by setsockopt().
#define getSn_KPALVTR | ( | sn | ) | ((uint8_t)(WIZCHIP_READ(Sn_KPALVTR(sn)) >> 8)) |
Get Sn_KPALVTR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint8_t. Value of Sn_KPALVTR.
- See also
- setSn_KPALVTR()
Definition at line 2112 of file w5300.h.
Referenced by getsockopt(), and setsockopt().
#define setSn_PROTOR | ( | sn, | |
proto | |||
) | WIZCHIP_WRITE(Sn_PROTOR(sn),(WIZCHIP_READ(Sn_PROTOR(sn) & 0xFF00) | (((uint16_t)proto) & 0x00FF)) |
Set Sn_PROTOR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ _WIZCHIP_SOCK_NUM_. (uint8_t)proto Value to set Sn_PROTOR
- See also
- getSn_PROTOR()
#define getSn_PROTOR | ( | sn | ) | ((uint8_t)WIZCHIP_READ(Sn_PROTOR(sn))) |
Get Sn_PROTOR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ _WIZCHIP_SOCK_NUM_.
- Returns
- uint8_t. Value of Sn_PROTOR.
- See also
- setSn_PROTOR()
#define setSn_TX_WRSR | ( | sn, | |
txwrs | |||
) |
Set Sn_TX_WRSR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint32_t)txwrs Value to set Sn_KPALVTR (It should be <= 0x00010000)
- See also
- getSn_TX_WRSR()
#define getSn_TX_WRSR | ( | sn | ) | ( (((uint32_t)WIZCHIP_READ(Sn_TX_WRSR(sn))) << 16) + (((uint32_t)WIZCHIP_READ(WIZCHIP_OFFSET_INC(Sn_TX_WRSR(sn),1))) & 0x0000FFFF) ) |
Get Sn_TX_WRSR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint32_t. Value of Sn_TX_WRSR.
- See also
- setSn_TX_WRSR()
#define setSn_TX_FIFOR | ( | sn, | |
txfifo | |||
) | WIZCHIP_WRITE(Sn_TX_FIFOR(sn), txfifo); |
Set Sn_TX_FIFOR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint16_t)txfifo. Value to set Sn_TX_FIFOR.
#define getSn_RX_FIFOR | ( | sn | ) | WIZCHIP_READ(Sn_RX_FIFOR(sn)); |
Get Sn_RX_FIFOR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint16_t. Value of Sn_RX_FIFOR.
#define setSn_TOSR | ( | sn, | |
tos | |||
) | WIZCHIP_WRITE(Sn_TOS(sn), ((uint16_t)tos) & 0x00FF) |
Set Sn_TOSR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ _WIZCHIP_SOCK_NUM_. (uint8_t)tos Value to set Sn_TOSR
- See also
- getSn_TOSR()
#define getSn_TOSR | ( | sn | ) | ((uint8_t)WIZCHIP_READ(Sn_TOSR(sn))) |
Get Sn_TOSR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ _WIZCHIP_SOCK_NUM_ .
- Returns
- uint8_t. Value of Sn_TOSR.
- See also
- setSn_TOSR()
#define setSn_TTLR | ( | sn, | |
ttl | |||
) | WIZCHIP_WRITE(Sn_TTLR(sn), ((uint16_t)ttl) & 0x00FF) |
Set Sn_TTLR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint8_t)ttl Value to set Sn_TTLR
- See also
- getSn_TTLR()
#define getSn_TTLR | ( | sn | ) | ((uint8_t)WIZCHIP_READ(Sn_TTL(sn))) |
Get Sn_TTLR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint8_t. Value of Sn_TTLR.
- See also
- setSn_TTLR()
#define setSn_FRAGR | ( | sn, | |
frag | |||
) | WIZCHIP_WRITE(Sn_FRAGR(sn), (uint16_t)(frag >>8)) |
Set Sn_FRAGR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7. (uint16_t)frag Value to set Sn_FRAGR
- See also
- getSn_FRAGR()
#define getSn_FRAGR | ( | sn | ) | (WIZCHIP_READ(Sn_FRAG(sn)) << 8) |
Get Sn_FRAGR register.
- Parameters
-
(uint8_t)sn Socket number. It should be 0 ~ 7.
- Returns
- uint16_t. Value of Sn_FRAGR.
- See also
- setSn_FRAGR()
Function Documentation
uint32_t getSn_TX_FSR | ( | uint8_t | sn | ) |
Generated on Wed May 4 2016 16:44:00 for Socket APIs by 1.8.9.1