W5500
Functions | Variables
wizchip_conf.c File Reference

WIZCHIP Config Header File. More...

#include "wizchip_conf.h"
Include dependency graph for wizchip_conf.c:

Go to the source code of this file.

Functions

void wizchip_cris_enter (void)
 Default function to enable interrupt. More...
 
void wizchip_cris_exit (void)
 Default function to disable interrupt. More...
 
void wizchip_cs_select (void)
 Default function to select chip. More...
 
void wizchip_cs_deselect (void)
 Default function to deselect chip. More...
 
uint8_t wizchip_bus_readbyte (uint32_t AddrSel)
 Default function to read in direct or indirect interface. More...
 
void wizchip_bus_writebyte (uint32_t AddrSel, uint8_t wb)
 Default function to write in direct or indirect interface. More...
 
uint8_t wizchip_spi_readbyte (void)
 Default function to read in SPI interface. More...
 
void wizchip_spi_writebyte (uint8_t wb)
 Default function to write in SPI interface. More...
 
void reg_wizchip_cris_cbfunc (void(*cris_en)(void), void(*cris_ex)(void))
 Register call back function for critical section of I/O functions such as WIZCHIP_READ, WIZCHIP_WRITE, WIZCHIP_READ_BUF and WIZCHIP_WRITE_BUF. More...
 
void reg_wizchip_cs_cbfunc (void(*cs_sel)(void), void(*cs_desel)(void))
 Register call back function for chip select. More...
 
void reg_wizchip_bus_cbfunc (uint8_t(*bus_rb)(uint32_t addr), void(*bus_wb)(uint32_t addr, uint8_t wb))
 Register call back function for bus interface. More...
 
void reg_wizchip_spi_cbfunc (uint8_t(*spi_rb)(void), void(*spi_wb)(uint8_t wb))
 Register call back function for SPI interface. More...
 

Variables

_WIZCHIP WIZCHIP
 

Detailed Description

WIZCHIP Config Header File.

Version
1.0.0.0
Date
09/01/2013
Revision history
<09-01-2013> 1st Release
Author
MidnightCow

Copyright (c) 2013, WIZnet Co., LTD. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright 

notice, this list of conditions and the following disclaimer.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file wizchip_conf.c.

Function Documentation

void wizchip_cris_enter ( void  )

Default function to enable interrupt.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 47 of file wizchip_conf.c.

Referenced by reg_wizchip_cris_cbfunc().

void wizchip_cris_exit ( void  )

Default function to disable interrupt.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 53 of file wizchip_conf.c.

Referenced by reg_wizchip_cris_cbfunc().

void wizchip_cs_select ( void  )

Default function to select chip.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 59 of file wizchip_conf.c.

Referenced by reg_wizchip_cs_cbfunc().

void wizchip_cs_deselect ( void  )

Default function to deselect chip.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 65 of file wizchip_conf.c.

Referenced by reg_wizchip_cs_cbfunc().

uint8_t wizchip_bus_readbyte ( uint32_t  AddrSel)

Default function to read in direct or indirect interface.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 71 of file wizchip_conf.c.

Referenced by reg_wizchip_bus_cbfunc().

void wizchip_bus_writebyte ( uint32_t  AddrSel,
uint8_t  wb 
)

Default function to write in direct or indirect interface.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 78 of file wizchip_conf.c.

Referenced by reg_wizchip_bus_cbfunc().

uint8_t wizchip_spi_readbyte ( void  )

Default function to read in SPI interface.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 84 of file wizchip_conf.c.

Referenced by reg_wizchip_spi_cbfunc().

void wizchip_spi_writebyte ( uint8_t  wb)

Default function to write in SPI interface.

Note
This function help not to access wrong address. If you do not describe this function or register any functions, null function is called.

Definition at line 90 of file wizchip_conf.c.

Referenced by reg_wizchip_spi_cbfunc().

void reg_wizchip_cris_cbfunc ( void(*)(void)  cris_en,
void(*)(void)  cris_ex 
)

Register call back function for critical section of I/O functions such as WIZCHIP_READ, WIZCHIP_WRITE, WIZCHIP_READ_BUF and WIZCHIP_WRITE_BUF.

Todo:
Describe wizchip_int_enable and wizchip_int_disable function or register your functions.
Note
If you do not describe or register, null function is called.

Definition at line 108 of file wizchip_conf.c.

References __WIZCHIP::_CRIS::_enter, __WIZCHIP::_CRIS::_exit, __WIZCHIP::CRIS, wizchip_cris_enter(), and wizchip_cris_exit().

void reg_wizchip_cs_cbfunc ( void(*)(void)  cs_sel,
void(*)(void)  cs_desel 
)

Register call back function for chip select.

Todo:
Describe wizchip_cs_select and wizchip_cs_deselect function or register your functions.
Note
If you do not describe or register, null function is called.

Definition at line 122 of file wizchip_conf.c.

References __WIZCHIP::_CS::_deselect, __WIZCHIP::_CS::_select, __WIZCHIP::CS, wizchip_cs_deselect(), and wizchip_cs_select().

void reg_wizchip_bus_cbfunc ( uint8_t(*)(uint32_t addr)  bus_rb,
void(*)(uint32_t addr, uint8_t wb)  bus_wb 
)

Register call back function for bus interface.

Todo:
Describe wizchip_bus_readbyte and wizchip_bus_writebyte function or register your functions.
Note
If you do not describe or register, null function is called.

Definition at line 136 of file wizchip_conf.c.

References _WIZCHIP_IO_MODE_BUS_, __WIZCHIP::BUS, __WIZCHIP::IF, __WIZCHIP::if_mode, wizchip_bus_readbyte(), and wizchip_bus_writebyte().

void reg_wizchip_spi_cbfunc ( uint8_t(*)(void)  spi_rb,
void(*)(uint8_t wb)  spi_wb 
)

Register call back function for SPI interface.

Todo:
Describe wizchip_spi_readbyte and wizchip_spi_writebyte function or register your functions.
Note
If you do not describe or register, null function is called.

Definition at line 152 of file wizchip_conf.c.

References _WIZCHIP_IO_MODE_SPI_, __WIZCHIP::IF, __WIZCHIP::if_mode, __WIZCHIP::SPI, wizchip_spi_readbyte(), and wizchip_spi_writebyte().

Variable Documentation

_WIZCHIP WIZCHIP
Initial value:
=
{
.id = _WIZCHIP_ID_,
.if_mode = _WIZCHIP_IO_MODE_,
.CRIS._enter = wizchip_cris_enter,
.CRIS._exit = wizchip_cris_exit,
.CS._select = wizchip_cs_select,
.CS._deselect = wizchip_cs_deselect,
.IF.BUS._read_byte = wizchip_bus_readbyte,
.IF.BUS._write_byte = wizchip_bus_writebyte
}

Definition at line 93 of file wizchip_conf.c.

Referenced by WIZCHIP_CRITICAL_ENTER(), WIZCHIP_CRITICAL_EXIT(), WIZCHIP_READ(), WIZCHIP_READ_BUF(), WIZCHIP_WRITE(), and WIZCHIP_WRITE_BUF().