ioLibrary for Cortex M series
Functions
Common register access functions

These are functions to access common registers. More...

Collaboration diagram for Common register access functions:

Functions

void setMR (uint8_t mr)
 Set Mode Register. More...
 
uint8_t getMR (void)
 Get Mode Register. More...
 
void setGAR (uint8_t *gar)
 Set gateway IP address. More...
 
void getGAR (uint8_t *gar)
 Get gateway IP address. More...
 
void setSUBR (uint8_t *subr)
 Set subnet mask address. More...
 
void getSUBR (uint8_t *subr)
 Get subnet mask address. More...
 
void setSHAR (uint8_t *shar)
 Set local MAC address. More...
 
void getSHAR (uint8_t *shar)
 Get local MAC address. More...
 
void setSIPR (uint8_t *sipr)
 Set local IP address. More...
 
void getSIPR (uint8_t *sipr)
 Get local IP address. More...
 
void setINTLEVEL (uint16_t intlevel)
 Set INTLEVEL register. More...
 
uint16_t getINTLEVEL (void)
 Get INTLEVEL register. More...
 
void setIR (uint8_t ir)
 Set IR register. More...
 
uint8_t getIR (void)
 Get IR register. More...
 
void setIMR (uint8_t imr)
 Set IMR register. More...
 
uint8_t getIMR (void)
 Get IMR register. More...
 
void setSIR (uint8_t sir)
 Set SIR register. More...
 
uint8_t getSIR (void)
 Get SIR register. More...
 
void setSIMR (uint8_t simr)
 Set SIMR register. More...
 
uint8_t getSIMR (void)
 Get SIMR register. More...
 
void setRTR (uint16_t rtr)
 Set RTR register. More...
 
uint16_t getRTR (void)
 Get RTR register. More...
 
void setRCR (uint8_t rcr)
 Set RCR register. More...
 
uint8_t getRCR (void)
 Get RCR register. More...
 
void setPTIMER (uint8_t ptimer)
 Set PTIMER register. More...
 
uint8_t getPTIMER (void)
 Get PTIMER register. More...
 
void setPMAGIC (uint8_t pmagic)
 Set PMAGIC register. More...
 
uint8_t getPMAGIC (void)
 Get PMAGIC register. More...
 
void setPHAR (uint8_t *phar)
 Set PHAR register. More...
 
void getPHAR (uint8_t *phar)
 Get PHAR register. More...
 
void setPSID (uint16_t psid)
 Set PSID register. More...
 
uint16_t getPSID (void)
 Get PSID register. More...
 
void setPMRU (uint16_t pmru)
 Set PMRU register. More...
 
uint16_t getPMRU (void)
 Get PMRU register. More...
 
void getUIPR (uint8_t *uipr)
 Get unreachable IP address. More...
 
uint16_t getUPORTR (void)
 Get UPORTR register. More...
 
void setPHYCFGR (uint8_t phycfgr)
 Set PHYCFGR register. More...
 
uint8_t getPHYCFGR (void)
 Get PHYCFGR register. More...
 
uint8_t getVERSIONR (void)
 Get VERSIONR register. More...
 

Detailed Description

These are functions to access common registers.

Function Documentation

void setMR ( uint8_t  mr)

Set Mode Register.

Parameters
mrThe value to be set
See Also
getMR()

Definition at line 298 of file w5500.c.

References MR, and WIZCHIP_WRITE().

Referenced by wizchip_sw_reset().

uint8_t getMR ( void  )

Get Mode Register.

Returns
The value of Mode register
See Also
setMR()

Definition at line 303 of file w5500.c.

References MR, and WIZCHIP_READ().

Referenced by GetTCPSocketStatus(), GetUDPSocketStatus(), and wizchip_sw_reset().

void setGAR ( uint8_t *  gar)

Set gateway IP address.

Parameters
garPointer variable to set gateway IP address. It should be allocated 4 bytes.
See Also
getGAR()

Definition at line 308 of file w5500.c.

References GAR, and WIZCHIP_WRITE_BUF().

Referenced by ClsNetInfo(), SetNetInfo(), and wizchip_sw_reset().

void getGAR ( uint8_t *  gar)

Get gateway IP address.

Parameters
garPointer variable to get gateway IP address. It should be allocated 4 bytes.
See Also
setGAR()

Definition at line 313 of file w5500.c.

References GAR, and WIZCHIP_READ_BUF().

Referenced by GetNetInfo(), and wizchip_sw_reset().

void setSUBR ( uint8_t *  subr)

Set subnet mask address.

Parameters
subrPointer variable to set subnet mask address. It should be allocated 4 bytes.
See Also
getSUBR()

Definition at line 318 of file w5500.c.

References SUBR, and WIZCHIP_WRITE_BUF().

Referenced by ClsNetInfo(), SetNetInfo(), and wizchip_sw_reset().

void getSUBR ( uint8_t *  subr)

Get subnet mask address.

Parameters
subrPointer variable to get subnet mask address. It should be allocated 4 bytes.
See Also
setSUBR()

Definition at line 323 of file w5500.c.

References SUBR, and WIZCHIP_READ_BUF().

Referenced by GetNetInfo(), TCPCltOpenNB(), UDPSendNB(), and wizchip_sw_reset().

void setSHAR ( uint8_t *  shar)

Set local MAC address.

Parameters
sharPointer variable to set local MAC address. It should be allocated 6 bytes.
See Also
getSHAR()

Definition at line 328 of file w5500.c.

References SHAR, and WIZCHIP_WRITE_BUF().

Referenced by SetNetInfo(), and wizchip_sw_reset().

void getSHAR ( uint8_t *  shar)

Get local MAC address.

Parameters
sharPointer variable to get local MAC address. It should be allocated 6 bytes.
See Also
setSHAR()

Definition at line 333 of file w5500.c.

References SHAR, and WIZCHIP_READ_BUF().

Referenced by GetNetInfo(), and wizchip_sw_reset().

void setSIPR ( uint8_t *  sipr)

Set local IP address.

Parameters
siprPointer variable to set local IP address. It should be allocated 4 bytes.
See Also
getSIPR()

Definition at line 338 of file w5500.c.

References SIPR, and WIZCHIP_WRITE_BUF().

Referenced by ClsNetInfo(), SetNetInfo(), and wizchip_sw_reset().

void getSIPR ( uint8_t *  sipr)

Get local IP address.

Parameters
siprPointer variable to get local IP address. It should be allocated 4 bytes.
See Also
setSIPR()

Definition at line 343 of file w5500.c.

References SIPR, and WIZCHIP_READ_BUF().

Referenced by GetNetInfo(), TCPCltOpenNB(), UDPSendNB(), and wizchip_sw_reset().

void setINTLEVEL ( uint16_t  intlevel)

Set INTLEVEL register.

Parameters
intlevelValue to set INTLEVEL register.
See Also
getINTLEVEL()

Definition at line 348 of file w5500.c.

References INTLEVEL, WIZCHIP_OFFSET_INC, and WIZCHIP_WRITE().

uint16_t getINTLEVEL ( void  )

Get INTLEVEL register.

Returns
Value of INTLEVEL register.
See Also
setINTLEVEL()

Definition at line 354 of file w5500.c.

References INTLEVEL, WIZCHIP_OFFSET_INC, and WIZCHIP_READ().

void setIR ( uint8_t  ir)

Set IR register.

Parameters
irValue to set IR register.
See Also
getIR()

Definition at line 362 of file w5500.c.

References IR, and WIZCHIP_WRITE().

uint8_t getIR ( void  )

Get IR register.

Returns
Value of IR register.
See Also
setIR()

Definition at line 367 of file w5500.c.

References IR, and WIZCHIP_READ().

void setIMR ( uint8_t  imr)

Set IMR register.

Parameters
imrValue to set IMR register.
See Also
getIMR()

Definition at line 372 of file w5500.c.

References IMR, and WIZCHIP_WRITE().

Referenced by SetSocketOption().

uint8_t getIMR ( void  )

Get IMR register.

Returns
Value of IMR register.
See Also
setIMR()

Definition at line 377 of file w5500.c.

References IMR, and WIZCHIP_READ().

void setSIR ( uint8_t  sir)

Set SIR register.

Parameters
sirValue to set SIR register.
See Also
getSIR()

Definition at line 382 of file w5500.c.

References SIR, and WIZCHIP_WRITE().

uint8_t getSIR ( void  )

Get SIR register.

Returns
Value of SIR register.
See Also
setSIR()

Definition at line 387 of file w5500.c.

References SIR, and WIZCHIP_READ().

void setSIMR ( uint8_t  simr)

Set SIMR register.

Parameters
simrValue to set SIMR register.
See Also
getSIMR()

Definition at line 392 of file w5500.c.

References SIMR, and WIZCHIP_WRITE().

uint8_t getSIMR ( void  )

Get SIMR register.

Returns
Value of SIMR register.
See Also
setSIMR()

Definition at line 397 of file w5500.c.

References SIMR, and WIZCHIP_READ().

void setRTR ( uint16_t  rtr)

Set RTR register.

Parameters
rtrValue to set RTR register.
See Also
getRTR()

Definition at line 402 of file w5500.c.

References RTR, WIZCHIP_OFFSET_INC, and WIZCHIP_WRITE().

Referenced by SetSocketOption().

uint16_t getRTR ( void  )

Get RTR register.

Returns
Value of RTR register.
See Also
setRTR()

Definition at line 408 of file w5500.c.

References RTR, WIZCHIP_OFFSET_INC, and WIZCHIP_READ().

void setRCR ( uint8_t  rcr)

Set RCR register.

Parameters
rcrValue to set RCR register.
See Also
getRCR()

Definition at line 416 of file w5500.c.

References RCR, and WIZCHIP_WRITE().

Referenced by SetSocketOption().

uint8_t getRCR ( void  )

Get RCR register.

Returns
Value of RCR register.
See Also
setRCR()

Definition at line 421 of file w5500.c.

References RCR, and WIZCHIP_READ().

void setPTIMER ( uint8_t  ptimer)

Set PTIMER register.

Parameters
ptimerValue to set PTIMER register.
See Also
getPTIMER()

Definition at line 426 of file w5500.c.

References PTIMER, and WIZCHIP_WRITE().

uint8_t getPTIMER ( void  )

Get PTIMER register.

Returns
Value of PTIMER register.
See Also
setPTIMER()

Definition at line 431 of file w5500.c.

References PTIMER, and WIZCHIP_READ().

void setPMAGIC ( uint8_t  pmagic)

Set PMAGIC register.

Parameters
pmagicValue to set PMAGIC register.
See Also
getPMAGIC()

Definition at line 436 of file w5500.c.

References PMAGIC, and WIZCHIP_WRITE().

uint8_t getPMAGIC ( void  )

Get PMAGIC register.

Returns
Value of PMAGIC register.
See Also
setPMAGIC()

Definition at line 441 of file w5500.c.

References PMAGIC, and WIZCHIP_READ().

void setPHAR ( uint8_t *  phar)

Set PHAR register.

Parameters
pharPointer variable to set PPP destination MAC register address. It should be allocated 6 bytes.
See Also
getPHAR()

Definition at line 446 of file w5500.c.

References PHAR, and WIZCHIP_WRITE_BUF().

void getPHAR ( uint8_t *  phar)

Get PHAR register.

Parameters
pharPointer variable to PPP destination MAC register address. It should be allocated 6 bytes.
See Also
setPHAR()

Definition at line 451 of file w5500.c.

References PHAR, and WIZCHIP_READ_BUF().

void setPSID ( uint16_t  psid)

Set PSID register.

Parameters
psidValue to set PSID register.
See Also
getPSID()

Definition at line 456 of file w5500.c.

References PSID, WIZCHIP_OFFSET_INC, and WIZCHIP_WRITE().

uint16_t getPSID ( void  )

Get PSID register.

Returns
Value of PSID register.
See Also
setPSID()

Definition at line 462 of file w5500.c.

References PSID, WIZCHIP_OFFSET_INC, and WIZCHIP_READ().

void setPMRU ( uint16_t  pmru)

Set PMRU register.

Parameters
pmruValue to set PMRU register.
See Also
getPMRU()

Definition at line 470 of file w5500.c.

References PMRU, WIZCHIP_OFFSET_INC, and WIZCHIP_WRITE().

uint16_t getPMRU ( void  )

Get PMRU register.

Returns
Value of PMRU register.
See Also
setPMRU()

Definition at line 476 of file w5500.c.

References PMRU, WIZCHIP_OFFSET_INC, and WIZCHIP_READ().

void getUIPR ( uint8_t *  uipr)

Get unreachable IP address.

Parameters
uiprPointer variable to get unreachable IP address. It should be allocated 4 bytes.

Definition at line 485 of file w5500.c.

References UIPR, and WIZCHIP_READ_BUF().

uint16_t getUPORTR ( void  )

Get UPORTR register.

Returns
Value of UPORTR register.

Definition at line 490 of file w5500.c.

References UPORTR, WIZCHIP_OFFSET_INC, and WIZCHIP_READ().

void setPHYCFGR ( uint8_t  phycfgr)

Set PHYCFGR register.

Parameters
phycfgrValue to set PHYCFGR register.
See Also
getPHYCFGR()

Definition at line 497 of file w5500.c.

References PHYCFGR, and WIZCHIP_WRITE().

uint8_t getPHYCFGR ( void  )

Get PHYCFGR register.

Returns
Value of PHYCFGR register.
See Also
setPHYCFGR()

Definition at line 502 of file w5500.c.

References PHYCFGR, and WIZCHIP_READ().

uint8_t getVERSIONR ( void  )

Get VERSIONR register.

Returns
Value of VERSIONR register.

Definition at line 507 of file w5500.c.

References VERSIONR, and WIZCHIP_READ().