Socket APIs
|
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(_IMR_, imr) |
Set IMR register. More... | |
#define | getIMR() WIZCHIP_READ(_IMR_) |
Get IMR 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 | setRMSR(rmsr) WIZCHIP_WRITE(RMSR) |
Get RMSR register. More... | |
#define | getRMSR() WIZCHIP_READ() |
Get RMSR register. More... | |
#define | setTMSR(rmsr) WIZCHIP_WRITE(TMSR) |
Get TMSR register. More... | |
#define | getPATR() (((uint16_t)WIZCHIP_READ(PATR) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PATR,1))) |
Get TMSR register. More... | |
#define | getPPPALGO() WIZCHIP_READ(PPPALGO) |
Get PPPALGO 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... | |
Detailed Description
These are functions to access common registers.
Macro Definition Documentation
#define setMR | ( | mr | ) | (*((uint8_t*)MR) = mr) |
Set Mode Register.
- Parameters
-
(uint8_t)mr The value to be set.
- See also
- getMR()
Definition at line 1108 of file w5100.h.
Referenced by wizchip_setnetmode(), and wizchip_sw_reset().
#define getMR | ( | ) | (*(uint8_t*)MR) |
Get MR.
- Returns
- uint8_t. The value of Mode register.
- See also
- setMR()
Definition at line 1120 of file w5100.h.
Referenced by recv(), recvfrom(), wizchip_getnetmode(), wizchip_setnetmode(), and wizchip_sw_reset().
#define setGAR | ( | gar | ) | WIZCHIP_WRITE_BUF(GAR,gar,4) |
Set GAR.
- Parameters
-
(uint8_t*)gar Pointer variable to set gateway IP address. It should be allocated 4 bytes.
- See also
- getGAR()
Definition at line 1129 of file w5100.h.
Referenced by wizchip_setnetinfo(), and wizchip_sw_reset().
#define getGAR | ( | gar | ) | WIZCHIP_READ_BUF(GAR,gar,4) |
Get GAR.
- Parameters
-
(uint8_t*)gar Pointer variable to get gateway IP address. It should be allocated 4 bytes.
- See also
- setGAR()
Definition at line 1138 of file w5100.h.
Referenced by wizchip_getnetinfo(), and wizchip_sw_reset().
#define setSUBR | ( | subr | ) | WIZCHIP_WRITE_BUF(SUBR,subr,4) |
Set SUBR.
- Parameters
-
(uint8_t*)subr Pointer variable to set subnet mask address. It should be allocated 4 bytes.
- Note
- If subr is null pointer, set the backup subnet to SUBR.
If subr is 0.0.0.0, back up SUBR and clear it.
Otherwize, set subr to SUBR
- See also
- getSUBR()
Definition at line 1150 of file w5100.h.
Referenced by sendto(), wizchip_setnetinfo(), and wizchip_sw_reset().
#define getSUBR | ( | subr | ) | WIZCHIP_READ_BUF(SUBR, subr, 4) |
Get SUBR.
- Parameters
-
(uint8_t*)subr Pointer variable to get subnet mask address. It should be allocated 4 bytes.
- See also
- setSUBR()
Definition at line 1159 of file w5100.h.
Referenced by sendto(), wizchip_getnetinfo(), and wizchip_sw_reset().
#define setSHAR | ( | shar | ) | WIZCHIP_WRITE_BUF(SHAR, shar, 6) |
Set SHAR.
- Parameters
-
(uint8_t*)shar Pointer variable to set local MAC address. It should be allocated 6 bytes.
- See also
- getSHAR()
Definition at line 1168 of file w5100.h.
Referenced by wizchip_setnetinfo(), and wizchip_sw_reset().
#define getSHAR | ( | shar | ) | WIZCHIP_READ_BUF(SHAR, shar, 6) |
Get SHAR.
- Parameters
-
(uint8_t*)shar Pointer variable to get local MAC address. It should be allocated 6 bytes.
- See also
- setSHAR()
Definition at line 1177 of file w5100.h.
Referenced by wizchip_getnetinfo(), and wizchip_sw_reset().
#define setSIPR | ( | sipr | ) | WIZCHIP_WRITE_BUF(SIPR, sipr, 4) |
Set SIPR.
- Parameters
-
(uint8_t*)sipr Pointer variable to set local IP address. It should be allocated 4 bytes.
- See also
- getSIPR()
Definition at line 1186 of file w5100.h.
Referenced by wizchip_setnetinfo(), and wizchip_sw_reset().
#define getSIPR | ( | sipr | ) | WIZCHIP_READ_BUF(SIPR, sipr, 4) |
Get SIPR.
- Parameters
-
(uint8_t*)sipr Pointer variable to get local IP address. It should be allocated 4 bytes.
- See also
- setSIPR()
Definition at line 1195 of file w5100.h.
Referenced by sendto(), socket(), wizchip_getnetinfo(), and wizchip_sw_reset().
#define setIR | ( | ir | ) | WIZCHIP_WRITE(IR, (ir & 0xA0)) |
#define getIR | ( | ) | (WIZCHIP_READ(IR) & 0xA0) |
#define setIMR | ( | imr | ) | WIZCHIP_WRITE(_IMR_, imr) |
Set IMR register.
- Parameters
-
(uint8_t)imr Value to set IMR register.
- See also
- getIMR()
Definition at line 1221 of file w5100.h.
Referenced by wizchip_setinterruptmask().
#define getIMR | ( | ) | WIZCHIP_READ(_IMR_) |
Get IMR register.
- Returns
- uint8_t. Value of IMR register.
- See also
- setIMR()
Definition at line 1230 of file w5100.h.
Referenced by wizchip_getinterruptmask().
#define setRTR | ( | rtr | ) |
Set RTR register.
- Parameters
-
(uint16_t)rtr Value to set RTR register.
- See also
- getRTR()
Definition at line 1239 of file w5100.h.
Referenced by wizchip_settimeout().
#define getRTR | ( | ) | (((uint16_t)WIZCHIP_READ(_RTR_) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(_RTR_,1))) |
Get RTR register.
- Returns
- uint16_t. Value of RTR register.
- See also
- setRTR()
Definition at line 1250 of file w5100.h.
Referenced by wizchip_gettimeout().
#define setRCR | ( | rcr | ) | WIZCHIP_WRITE(_RCR_, rcr) |
Set RCR register.
- Parameters
-
(uint8_t)rcr Value to set RCR register.
- See also
- getRCR()
Definition at line 1259 of file w5100.h.
Referenced by wizchip_settimeout().
#define getRCR | ( | ) | WIZCHIP_READ(_RCR_) |
Get RCR register.
- Returns
- uint8_t. Value of RCR register.
- See also
- setRCR()
Definition at line 1268 of file w5100.h.
Referenced by wizchip_gettimeout().
#define setRMSR | ( | rmsr | ) | WIZCHIP_WRITE(RMSR) |
#define getRMSR | ( | ) | WIZCHIP_READ() |
#define setTMSR | ( | rmsr | ) | WIZCHIP_WRITE(TMSR) |
#define getPATR | ( | ) | (((uint16_t)WIZCHIP_READ(PATR) << 8) + WIZCHIP_READ(WIZCHIP_OFFSET_INC(PATR,1))) |
#define getPPPALGO | ( | ) | WIZCHIP_READ(PPPALGO) |
#define setPTIMER | ( | ptimer | ) | WIZCHIP_WRITE(PTIMER, ptimer) |
#define getPTIMER | ( | ) | WIZCHIP_READ(PTIMER) |
#define setPMAGIC | ( | pmagic | ) | WIZCHIP_WRITE(PMAGIC, pmagic) |
#define getPMAGIC | ( | ) | WIZCHIP_READ(PMAGIC) |
Generated on Wed May 4 2016 16:44:00 for Socket APIs by 1.8.9.1