Webserver+3d print

Dependents:   Nucleo

Revision:
0:8918a71cdbe9
diff -r 000000000000 -r 8918a71cdbe9 cyclone_tcp/drivers/mrf24wg_driver.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cyclone_tcp/drivers/mrf24wg_driver.h	Sat Feb 04 18:15:49 2017 +0000
@@ -0,0 +1,83 @@
+/**
+ * @file mrf24wg_driver.h
+ * @brief MRF24WG Wi-Fi controller
+ *
+ * @section License
+ *
+ * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
+ *
+ * This file is part of CycloneTCP Open.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * @author Oryx Embedded SARL (www.oryx-embedded.com)
+ * @version 1.7.6
+ **/
+
+#ifndef _MRF24WG_DRIVER_H
+#define _MRF24WG_DRIVER_H
+
+//Dependencies
+#include "core/nic.h"
+
+//TX buffer size
+#ifndef MRF24WG_TX_BUFFER_SIZE
+   #define MRF24WG_TX_BUFFER_SIZE 1536
+#elif (MRF24WG_TX_BUFFER_SIZE != 1536)
+   #error MRF24WG_TX_BUFFER_SIZE parameter is not valid
+#endif
+
+//RX buffer size
+#ifndef MRF24WG_RX_BUFFER_SIZE
+   #define MRF24WG_RX_BUFFER_SIZE 1536
+#elif (MRF24WG_RX_BUFFER_SIZE != 1536)
+   #error MRF24WG_RX_BUFFER_SIZE parameter is not valid
+#endif
+
+
+/**
+ * @brief TX buffer
+ **/
+
+typedef struct
+{
+   bool_t used;
+   size_t length;
+   uint8_t data[MRF24WG_TX_BUFFER_SIZE];
+} Mrf24wgBuffer;
+
+
+//MRF24WG driver
+extern const NicDriver mrf24wgDriver;
+
+//MRF24WG related functions
+error_t mrf24wgInit(NetInterface *interface);
+
+void mrf24wgTick(NetInterface *interface);
+
+void mrf24wgEnableIrq(NetInterface *interface);
+void mrf24wgDisableIrq(NetInterface *interface);
+void mrf24wgEventHandler(NetInterface *interface);
+
+error_t mrf24wgSendPacket(NetInterface *interface,
+   const NetBuffer *buffer, size_t offset);
+
+error_t mrf24wgSetMulticastFilter(NetInterface *interface);
+
+void mrf24wgAppWifiEvent(uint8_t msgType, void *msg);
+void mrf24wgAppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf);
+
+#endif
+