winc1500_driver.h
Go to the documentation of this file.
1 /**
2  * @file winc1500_driver.h
3  * @brief WINC1500 Wi-Fi controller
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneTCP Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.4
29  **/
30 
31 #ifndef _WINC1500_DRIVER_H
32 #define _WINC1500_DRIVER_H
33 
34 //Dependencies
35 #include "core/nic.h"
36 
37 //TX buffer size
38 #ifndef WINC1500_TX_BUFFER_SIZE
39  #define WINC1500_TX_BUFFER_SIZE 1600
40 #elif (WINC1500_TX_BUFFER_SIZE != 1600)
41  #error WINC1500_TX_BUFFER_SIZE parameter is not valid
42 #endif
43 
44 //RX buffer size
45 #ifndef WINC1500_RX_BUFFER_SIZE
46  #define WINC1500_RX_BUFFER_SIZE 1600
47 #elif (WINC1500_RX_BUFFER_SIZE != 1600)
48  #error WINC1500_RX_BUFFER_SIZE parameter is not valid
49 #endif
50 
51 //C++ guard
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
55 
56 //WINC1500 driver
57 extern const NicDriver winc1500Driver;
58 
59 //WINC1500 related functions
61 
62 void winc1500Tick(NetInterface *interface);
63 
64 void winc1500EnableIrq(NetInterface *interface);
65 void winc1500DisableIrq(NetInterface *interface);
67 void winc1500EventHandler(NetInterface *interface);
68 
70  const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary);
71 
73 
74 void winc1500AppWifiEvent(uint8_t msgType, void *msg);
75 void winc1500AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf);
76 
77 //C++ guard
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
int bool_t
Definition: compiler_port.h:53
error_t winc1500SendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
error_t winc1500Init(NetInterface *interface)
WINC1500 initialization.
Structure describing a buffer that spans multiple chunks.
Definition: net_mem.h:89
void winc1500DisableIrq(NetInterface *interface)
Disable interrupts.
const NicDriver winc1500Driver
WINC1500 driver.
void winc1500AppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf)
Callback function that handles events in bypass mode.
void winc1500EnableIrq(NetInterface *interface)
Enable interrupts.
void winc1500Tick(NetInterface *interface)
WINC1500 timer handler.
bool_t winc1500IrqHandler(void)
WINC1500 interrupt service routine.
error_t
Error codes.
Definition: error.h:43
#define NetInterface
Definition: net.h:36
#define NetTxAncillary
Definition: net_misc.h:36
void winc1500AppWifiEvent(uint8_t msgType, void *msg)
Callback function that handles Wi-Fi events.
uint8_t msgType
Network interface controller abstraction layer.
error_t winc1500UpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
NIC driver.
Definition: nic.h:286
void winc1500EventHandler(NetInterface *interface)
WINC1500 event handler.