Socket APIs
|
Common register access functions
These are functions to access common registers. More...
Macros | |
#define | getSHAR(shar) |
Get local MAC address. More... | |
#define | setMR(mr) WIZCHIP_WRITE(MR,mr) |
Set Mode Register. More... | |
#define | getMR() WIZCHIP_READ(MR) |
Get Mode Register. More... | |
#define | setGAR(gar) WIZCHIP_WRITE_BUF(GAR,gar,4) |
Set gateway IP address. More... | |
#define | getGAR(gar) WIZCHIP_READ_BUF(GAR,gar,4) |
Get gateway IP address. More... | |
#define | setSUBR(subr) WIZCHIP_WRITE_BUF(SUBR, subr,4) |
Set subnet mask address. More... | |
#define | getSUBR(subr) WIZCHIP_READ_BUF(SUBR, subr, 4) |
Get subnet mask address. More... | |
#define | setSHAR(shar) WIZCHIP_WRITE_BUF(SHAR, shar, 6) |
Set local MAC address. More... | |
#define | getSHAR(shar) WIZCHIP_READ_BUF(SHAR, shar, 6) |
Get local MAC address. More... | |
#define | setSIPR(sipr) WIZCHIP_WRITE_BUF(SIPR, sipr, 4) |
Set local IP address. More... | |
#define | getSIPR(sipr) WIZCHIP_READ_BUF(SIPR, sipr, 4) |
Get local IP address. More... | |
#define | setINTLEVEL(intlevel) |
Set INTLEVEL register. More... | |
#define | getINTLEVEL() (((uint16_t)WIZCHIP_READ(INTLEVEL) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(INTLEVEL,1))) |
Get INTLEVEL register. More... | |
#define | setIR(ir) WIZCHIP_WRITE(IR, (ir & 0xF0)) |
Set IR register. More... | |
#define | getIR() (WIZCHIP_READ(IR) & 0xF0) |
Get IR register. More... | |
#define | setIMR(imr) WIZCHIP_WRITE(_IMR_, imr) |
Set IMR register. More... | |
#define | getIMR() WIZCHIP_READ(_IMR_) |
Get IMR register. More... | |
#define | setSIR(sir) WIZCHIP_WRITE(SIR, sir) |
Set SIR register. More... | |
#define | getSIR() WIZCHIP_READ(SIR) |
Get SIR register. More... | |
#define | setSIMR(simr) WIZCHIP_WRITE(SIMR, simr) |
Set SIMR register. More... | |
#define | getSIMR() WIZCHIP_READ(SIMR) |
Get SIMR register. More... | |
#define | setRTR(rtr) |
Set RTR register. More... | |
#define | getRTR() (((uint16_t)WIZCHIP_READ(_RTR_) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(_RTR_,1))) |
Get RTR register. More... | |
#define | setRCR(rcr) WIZCHIP_WRITE(_RCR_, rcr) |
Set RCR register. More... | |
#define | getRCR() WIZCHIP_READ(_RCR_) |
Get RCR register. More... | |
#define | setPTIMER(ptimer) WIZCHIP_WRITE(PTIMER, ptimer) |
Set PTIMER register. More... | |
#define | getPTIMER() WIZCHIP_READ(PTIMER) |
Get PTIMER register. More... | |
#define | setPMAGIC(pmagic) WIZCHIP_WRITE(PMAGIC, pmagic) |
Set PMAGIC register. More... | |
#define | getPMAGIC() WIZCHIP_READ(PMAGIC) |
Get PMAGIC register. More... | |
#define | setPHAR(phar) WIZCHIP_WRITE_BUF(PHAR, phar, 6) |
Set PHAR address. More... | |
#define | getPHAR(phar) WIZCHIP_READ_BUF(PHAR, phar, 6) |
Get PHAR address. More... | |
#define | setPSID(psid) |
Set PSID register. More... | |
#define | getPSID() (((uint16_t)WIZCHIP_READ(PSID) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PSID,1))) |
Get PSID register. More... | |
#define | setPMRU(pmru) |
Set PMRU register. More... | |
#define | getPMRU() (((uint16_t)WIZCHIP_READ(PMRU) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PMRU,1))) |
Get PMRU register. More... | |
#define | getUIPR(uipr) WIZCHIP_READ_BUF(UIPR,uipr,4) |
Get unreachable IP address. More... | |
#define | getUPORTR() (((uint16_t)WIZCHIP_READ(UPORTR) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(UPORTR,1))) |
Get UPORTR register. More... | |
#define | setPHYCFGR(phycfgr) WIZCHIP_WRITE(PHYCFGR, phycfgr) |
Set PHYCFGR register. More... | |
#define | getPHYCFGR() WIZCHIP_READ(PHYCFGR) |
Get PHYCFGR register. More... | |
#define | getVERSIONR() WIZCHIP_READ(VERSIONR) |
Get VERSIONR register. More... | |
Detailed Description
These are functions to access common registers.
Macro Definition Documentation
#define getSHAR | ( | shar | ) |
Value:
{ \
(shar)[0] = (uint8_t)(WIZCHIP_READ(SHAR) >> 8); \
(shar)[1] = (uint8_t)(WIZCHIP_READ(SHAR)); \
}
Get local MAC address.
- Parameters
-
(uint8_t*)shar Pointer variable to get local MAC address. It should be allocated 6 bytes.
- See also
- setSHAR()
#define setMR | ( | mr | ) | WIZCHIP_WRITE(MR,mr) |
#define getMR | ( | ) | WIZCHIP_READ(MR) |
#define setGAR | ( | gar | ) | WIZCHIP_WRITE_BUF(GAR,gar,4) |
#define getGAR | ( | gar | ) | WIZCHIP_READ_BUF(GAR,gar,4) |
#define setSUBR | ( | subr | ) | WIZCHIP_WRITE_BUF(SUBR, subr,4) |
#define getSUBR | ( | subr | ) | WIZCHIP_READ_BUF(SUBR, subr, 4) |
#define setSHAR | ( | shar | ) | WIZCHIP_WRITE_BUF(SHAR, shar, 6) |
#define getSHAR | ( | shar | ) | WIZCHIP_READ_BUF(SHAR, shar, 6) |
#define setSIPR | ( | sipr | ) | WIZCHIP_WRITE_BUF(SIPR, sipr, 4) |
#define getSIPR | ( | sipr | ) | WIZCHIP_READ_BUF(SIPR, sipr, 4) |
#define setINTLEVEL | ( | intlevel | ) |
Value:
{\
}
Set INTLEVEL register.
- Parameters
-
(uint16_t)intlevel Value to set INTLEVEL register.
- See also
- getINTLEVEL()
#define getINTLEVEL | ( | ) | (((uint16_t)WIZCHIP_READ(INTLEVEL) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(INTLEVEL,1))) |
#define setIR | ( | ir | ) | WIZCHIP_WRITE(IR, (ir & 0xF0)) |
#define getIR | ( | ) | (WIZCHIP_READ(IR) & 0xF0) |
#define setIMR | ( | imr | ) | WIZCHIP_WRITE(_IMR_, imr) |
#define getIMR | ( | ) | WIZCHIP_READ(_IMR_) |
#define setSIR | ( | sir | ) | WIZCHIP_WRITE(SIR, sir) |
#define getSIR | ( | ) | WIZCHIP_READ(SIR) |
#define setSIMR | ( | simr | ) | WIZCHIP_WRITE(SIMR, simr) |
#define getSIMR | ( | ) | WIZCHIP_READ(SIMR) |
#define setRTR | ( | rtr | ) |
#define getRTR | ( | ) | (((uint16_t)WIZCHIP_READ(_RTR_) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(_RTR_,1))) |
#define setRCR | ( | rcr | ) | WIZCHIP_WRITE(_RCR_, rcr) |
#define getRCR | ( | ) | WIZCHIP_READ(_RCR_) |
#define setPTIMER | ( | ptimer | ) | WIZCHIP_WRITE(PTIMER, ptimer) |
#define getPTIMER | ( | ) | WIZCHIP_READ(PTIMER) |
#define setPMAGIC | ( | pmagic | ) | WIZCHIP_WRITE(PMAGIC, pmagic) |
#define getPMAGIC | ( | ) | WIZCHIP_READ(PMAGIC) |
#define setPHAR | ( | phar | ) | WIZCHIP_WRITE_BUF(PHAR, phar, 6) |
#define getPHAR | ( | phar | ) | WIZCHIP_READ_BUF(PHAR, phar, 6) |
#define setPSID | ( | psid | ) |
#define getPSID | ( | ) | (((uint16_t)WIZCHIP_READ(PSID) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PSID,1))) |
#define setPMRU | ( | pmru | ) |
#define getPMRU | ( | ) | (((uint16_t)WIZCHIP_READ(PMRU) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PMRU,1))) |
#define getUIPR | ( | uipr | ) | WIZCHIP_READ_BUF(UIPR,uipr,4) |
#define getUPORTR | ( | ) | (((uint16_t)WIZCHIP_READ(UPORTR) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(UPORTR,1))) |
#define setPHYCFGR | ( | phycfgr | ) | WIZCHIP_WRITE(PHYCFGR, phycfgr) |
Set PHYCFGR register.
- Parameters
-
(uint8_t)phycfgr Value to set PHYCFGR register.
- See also
- getPHYCFGR()
Definition at line 1612 of file w5500.h.
Referenced by wizphy_reset(), wizphy_setphyconf(), and wizphy_setphypmode().
#define getPHYCFGR | ( | ) | WIZCHIP_READ(PHYCFGR) |
Get PHYCFGR register.
- Returns
- uint8_t. Value of PHYCFGR register.
- See also
- setPHYCFGR()
Definition at line 1621 of file w5500.h.
Referenced by wizphy_getphyconf(), wizphy_getphylink(), wizphy_getphypmode(), wizphy_getphystat(), wizphy_reset(), and wizphy_setphypmode().
Generated on Wed May 4 2016 16:44:00 for Socket APIs by 1.8.9.1