Socket APIs
|
Common register access functions
These are functions to access common registers. More...
Macros | |
#define | setMR(mr) (*((uint8_t*)MR) = mr) |
Set Mode Register. More... | |
#define | getMR() (*(uint8_t*)MR) |
Get MR. More... | |
#define | setGAR(gar) WIZCHIP_WRITE_BUF(GAR,gar,4) |
Set GAR. More... | |
#define | getGAR(gar) WIZCHIP_READ_BUF(GAR,gar,4) |
Get GAR. More... | |
#define | setSUBR(subr) WIZCHIP_WRITE_BUF(SUBR, subr,4) |
Set SUBR. More... | |
#define | getSUBR(subr) WIZCHIP_READ_BUF(SUBR, subr, 4) |
Get SUBR. More... | |
#define | setSHAR(shar) WIZCHIP_WRITE_BUF(SHAR, shar, 6) |
Set SHAR. More... | |
#define | getSHAR(shar) WIZCHIP_READ_BUF(SHAR, shar, 6) |
Get SHAR. More... | |
#define | setSIPR(sipr) WIZCHIP_WRITE_BUF(SIPR, sipr, 4) |
Set SIPR. More... | |
#define | getSIPR(sipr) WIZCHIP_READ_BUF(SIPR, sipr, 4) |
Get SIPR. More... | |
#define | setIR(ir) WIZCHIP_WRITE(IR, (ir & 0xA0)) |
Set IR register. More... | |
#define | getIR() (WIZCHIP_READ(IR) & 0xA0) |
Get IR register. More... | |
#define | setIMR(imr) WIZCHIP_WRITE(IMR2, imr & 0xA0) |
Set IMR2 register. More... | |
#define | getIMR() (WIZCHIP_READ(IMR2) & 0xA0) |
Get IMR2 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 | getPATR() (((uint16_t)WIZCHIP_READ(PATR) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PATR,1))) |
Get PATR register. More... | |
#define | getPPPALGO() WIZCHIP_READ(PPPALGO) |
Get PPPALGO register. More... | |
#define | getVERSIONR() WIZCHIP_READ(VERSIONR) |
Get VERSIONR 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 | 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 | setIR2(ir2) WIZCHIP_WRITE(IR2, ir2) |
Set IR2 register. More... | |
#define | getIR2() WIZCHIP_READ(IR2) |
Get IR2 register. More... | |
#define | getPHYSTATUS() WIZCHIP_READ(PHYSTATUS) |
Get PHYSTATUS register. More... | |
#define | setIMR2(imr2) WIZCHIP_WRITE(_IMR_, imr2) |
Set IMR register. More... | |
#define | getIMR2() WIZCHIP_READ(_IMR_) |
Get IMR register. More... | |
Detailed Description
These are functions to access common registers.
Macro Definition Documentation
#define setMR | ( | mr | ) | (*((uint8_t*)MR) = mr) |
#define getMR | ( | ) | (*(uint8_t*)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 setIR | ( | ir | ) | WIZCHIP_WRITE(IR, (ir & 0xA0)) |
#define getIR | ( | ) | (WIZCHIP_READ(IR) & 0xA0) |
#define setIMR | ( | imr | ) | WIZCHIP_WRITE(IMR2, imr & 0xA0) |
#define getIMR | ( | ) | (WIZCHIP_READ(IMR2) & 0xA0) |
#define setRTR | ( | rtr | ) |
Value:
Set RTR register.
- Parameters
-
(uint16_t)rtr Value to set RTR register.
- See also
- getRTR()
#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 getPATR | ( | ) | (((uint16_t)WIZCHIP_READ(PATR) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PATR,1))) |
#define getPPPALGO | ( | ) | WIZCHIP_READ(PPPALGO) |
#define getVERSIONR | ( | ) | WIZCHIP_READ(VERSIONR) |
#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 setINTLEVEL | ( | intlevel | ) |
Value:
Set INTLEVEL register.
- Parameters
-
(uint16_t)intlevel Value to set INTLEVEL register.
- See also
- getINTLEVEL()
Definition at line 1478 of file w5200.h.
Referenced by ctlwizchip().
#define getINTLEVEL | ( | ) | (((uint16_t)WIZCHIP_READ(INTLEVEL) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(INTLEVEL,1))) |
Get INTLEVEL register.
- Returns
- uint16_t. Value of INTLEVEL register.
- See also
- setINTLEVEL()
Definition at line 1488 of file w5200.h.
Referenced by ctlwizchip().
#define setIR2 | ( | ir2 | ) | WIZCHIP_WRITE(IR2, ir2) |
#define getIR2 | ( | ) | WIZCHIP_READ(IR2) |
#define getPHYSTATUS | ( | ) | WIZCHIP_READ(PHYSTATUS) |
Get PHYSTATUS register.
- Returns
- uint8_t. Value to set PHYSTATUS register.
Definition at line 1516 of file w5200.h.
Referenced by wizphy_getphylink(), and wizphy_getphypmode().
#define setIMR2 | ( | imr2 | ) | WIZCHIP_WRITE(_IMR_, imr2) |
Generated on Wed May 4 2016 16:44:00 for Socket APIs by 1.8.9.1