Sergey Pastor / 1

Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers wilc1000_driver.h Source File

wilc1000_driver.h

Go to the documentation of this file.
00001 /**
00002  * @file wilc1000_driver.h
00003  * @brief WILC1000 Wi-Fi controller
00004  *
00005  * @section License
00006  *
00007  * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
00008  *
00009  * This file is part of CycloneTCP Open.
00010  *
00011  * This program is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU General Public License
00013  * as published by the Free Software Foundation; either version 2
00014  * of the License, or (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software Foundation,
00023  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00024  *
00025  * @author Oryx Embedded SARL (www.oryx-embedded.com)
00026  * @version 1.7.6
00027  **/
00028 
00029 #ifndef _WILC1000_DRIVER_H
00030 #define _WILC1000_DRIVER_H
00031 
00032 //Dependencies
00033 #include "core/nic.h"
00034 
00035 //TX buffer size
00036 #ifndef WILC1000_TX_BUFFER_SIZE
00037    #define WILC1000_TX_BUFFER_SIZE 1600
00038 #elif (WILC1000_TX_BUFFER_SIZE != 1600)
00039    #error WILC1000_TX_BUFFER_SIZE parameter is not valid
00040 #endif
00041 
00042 //RX buffer size
00043 #ifndef WILC1000_RX_BUFFER_SIZE
00044    #define WILC1000_RX_BUFFER_SIZE 1600
00045 #elif (WILC1000_RX_BUFFER_SIZE != 1600)
00046    #error WILC1000_RX_BUFFER_SIZE parameter is not valid
00047 #endif
00048 
00049 //WILC1000 driver (STA mode)
00050 extern const NicDriver wilc1000StaDriver;
00051 //WILC1000 driver (AP mode)
00052 extern const NicDriver wilc1000ApDriver;
00053 
00054 //WILC1000 related functions
00055 error_t wilc1000Init(NetInterface *interface);
00056 
00057 void wilc1000Tick(NetInterface *interface);
00058 
00059 void wilc1000EnableIrq(NetInterface *interface);
00060 void wilc1000DisableIrq(NetInterface *interface);
00061 bool_t wilc1000IrqHandler(void);
00062 void wilc1000EventHandler(NetInterface *interface);
00063 
00064 error_t wilc1000SendPacket(NetInterface *interface,
00065    const NetBuffer *buffer, size_t offset);
00066 
00067 error_t wilc1000SetMulticastFilter(NetInterface *interface);
00068 bool_t wilc1000GetAddrRefCount(NetInterface *interface, const MacAddr *macAddr);
00069 
00070 void wilc1000AppWifiEvent(uint8_t msgType, void *msg);
00071 void wilc1000AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf);
00072 
00073 #endif
00074