Webserver+3d print

Dependents:   Nucleo

Committer:
Sergunb
Date:
Sat Feb 04 18:15:49 2017 +0000
Revision:
0:8918a71cdbe9
nothing else

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:8918a71cdbe9 1 /**
Sergunb 0:8918a71cdbe9 2 * @file mrf24wg_driver.h
Sergunb 0:8918a71cdbe9 3 * @brief MRF24WG Wi-Fi controller
Sergunb 0:8918a71cdbe9 4 *
Sergunb 0:8918a71cdbe9 5 * @section License
Sergunb 0:8918a71cdbe9 6 *
Sergunb 0:8918a71cdbe9 7 * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
Sergunb 0:8918a71cdbe9 8 *
Sergunb 0:8918a71cdbe9 9 * This file is part of CycloneTCP Open.
Sergunb 0:8918a71cdbe9 10 *
Sergunb 0:8918a71cdbe9 11 * This program is free software; you can redistribute it and/or
Sergunb 0:8918a71cdbe9 12 * modify it under the terms of the GNU General Public License
Sergunb 0:8918a71cdbe9 13 * as published by the Free Software Foundation; either version 2
Sergunb 0:8918a71cdbe9 14 * of the License, or (at your option) any later version.
Sergunb 0:8918a71cdbe9 15 *
Sergunb 0:8918a71cdbe9 16 * This program is distributed in the hope that it will be useful,
Sergunb 0:8918a71cdbe9 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Sergunb 0:8918a71cdbe9 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Sergunb 0:8918a71cdbe9 19 * GNU General Public License for more details.
Sergunb 0:8918a71cdbe9 20 *
Sergunb 0:8918a71cdbe9 21 * You should have received a copy of the GNU General Public License
Sergunb 0:8918a71cdbe9 22 * along with this program; if not, write to the Free Software Foundation,
Sergunb 0:8918a71cdbe9 23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Sergunb 0:8918a71cdbe9 24 *
Sergunb 0:8918a71cdbe9 25 * @author Oryx Embedded SARL (www.oryx-embedded.com)
Sergunb 0:8918a71cdbe9 26 * @version 1.7.6
Sergunb 0:8918a71cdbe9 27 **/
Sergunb 0:8918a71cdbe9 28
Sergunb 0:8918a71cdbe9 29 #ifndef _MRF24WG_DRIVER_H
Sergunb 0:8918a71cdbe9 30 #define _MRF24WG_DRIVER_H
Sergunb 0:8918a71cdbe9 31
Sergunb 0:8918a71cdbe9 32 //Dependencies
Sergunb 0:8918a71cdbe9 33 #include "core/nic.h"
Sergunb 0:8918a71cdbe9 34
Sergunb 0:8918a71cdbe9 35 //TX buffer size
Sergunb 0:8918a71cdbe9 36 #ifndef MRF24WG_TX_BUFFER_SIZE
Sergunb 0:8918a71cdbe9 37 #define MRF24WG_TX_BUFFER_SIZE 1536
Sergunb 0:8918a71cdbe9 38 #elif (MRF24WG_TX_BUFFER_SIZE != 1536)
Sergunb 0:8918a71cdbe9 39 #error MRF24WG_TX_BUFFER_SIZE parameter is not valid
Sergunb 0:8918a71cdbe9 40 #endif
Sergunb 0:8918a71cdbe9 41
Sergunb 0:8918a71cdbe9 42 //RX buffer size
Sergunb 0:8918a71cdbe9 43 #ifndef MRF24WG_RX_BUFFER_SIZE
Sergunb 0:8918a71cdbe9 44 #define MRF24WG_RX_BUFFER_SIZE 1536
Sergunb 0:8918a71cdbe9 45 #elif (MRF24WG_RX_BUFFER_SIZE != 1536)
Sergunb 0:8918a71cdbe9 46 #error MRF24WG_RX_BUFFER_SIZE parameter is not valid
Sergunb 0:8918a71cdbe9 47 #endif
Sergunb 0:8918a71cdbe9 48
Sergunb 0:8918a71cdbe9 49
Sergunb 0:8918a71cdbe9 50 /**
Sergunb 0:8918a71cdbe9 51 * @brief TX buffer
Sergunb 0:8918a71cdbe9 52 **/
Sergunb 0:8918a71cdbe9 53
Sergunb 0:8918a71cdbe9 54 typedef struct
Sergunb 0:8918a71cdbe9 55 {
Sergunb 0:8918a71cdbe9 56 bool_t used;
Sergunb 0:8918a71cdbe9 57 size_t length;
Sergunb 0:8918a71cdbe9 58 uint8_t data[MRF24WG_TX_BUFFER_SIZE];
Sergunb 0:8918a71cdbe9 59 } Mrf24wgBuffer;
Sergunb 0:8918a71cdbe9 60
Sergunb 0:8918a71cdbe9 61
Sergunb 0:8918a71cdbe9 62 //MRF24WG driver
Sergunb 0:8918a71cdbe9 63 extern const NicDriver mrf24wgDriver;
Sergunb 0:8918a71cdbe9 64
Sergunb 0:8918a71cdbe9 65 //MRF24WG related functions
Sergunb 0:8918a71cdbe9 66 error_t mrf24wgInit(NetInterface *interface);
Sergunb 0:8918a71cdbe9 67
Sergunb 0:8918a71cdbe9 68 void mrf24wgTick(NetInterface *interface);
Sergunb 0:8918a71cdbe9 69
Sergunb 0:8918a71cdbe9 70 void mrf24wgEnableIrq(NetInterface *interface);
Sergunb 0:8918a71cdbe9 71 void mrf24wgDisableIrq(NetInterface *interface);
Sergunb 0:8918a71cdbe9 72 void mrf24wgEventHandler(NetInterface *interface);
Sergunb 0:8918a71cdbe9 73
Sergunb 0:8918a71cdbe9 74 error_t mrf24wgSendPacket(NetInterface *interface,
Sergunb 0:8918a71cdbe9 75 const NetBuffer *buffer, size_t offset);
Sergunb 0:8918a71cdbe9 76
Sergunb 0:8918a71cdbe9 77 error_t mrf24wgSetMulticastFilter(NetInterface *interface);
Sergunb 0:8918a71cdbe9 78
Sergunb 0:8918a71cdbe9 79 void mrf24wgAppWifiEvent(uint8_t msgType, void *msg);
Sergunb 0:8918a71cdbe9 80 void mrf24wgAppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf);
Sergunb 0:8918a71cdbe9 81
Sergunb 0:8918a71cdbe9 82 #endif
Sergunb 0:8918a71cdbe9 83