mrf24wg_driver.c File Reference

MRF24WG Wi-Fi controller. More...

#include "core/net.h"
#include "drivers/wifi/mrf24wg_driver.h"
#include "debug.h"
#include "wf_universal_driver.h"
#include "wf_debug_output.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   NIC_TRACE_LEVEL
 

Functions

error_t mrf24wgInit (NetInterface *interface)
 MRF24WG initialization. More...
 
void mrf24wgTick (NetInterface *interface)
 MRF24WG timer handler. More...
 
void mrf24wgEnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void mrf24wgDisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void mrf24wgEventHandler (NetInterface *interface)
 MRF24WG event handler. More...
 
error_t mrf24wgSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
 Send a packet. More...
 
error_t mrf24wgUpdateMacAddrFilter (NetInterface *interface)
 Configure MAC address filtering. More...
 
void WF_ProcessEvent (uint8_t eventType, uint32_t eventData)
 Callback function that handles Wi-Fi events. More...
 
void WF_RxPacketReady (void)
 Callback function (packet received) More...
 
void WF_TxComplete (uint8_t *p)
 Callback function (packet transmitted) More...
 

Variables

const NicDriver mrf24wgDriver
 MRF24WG driver. More...
 

Detailed Description

MRF24WG Wi-Fi controller.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 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
2.4.4

Definition in file mrf24wg_driver.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   NIC_TRACE_LEVEL

Definition at line 32 of file mrf24wg_driver.c.

Function Documentation

◆ mrf24wgDisableIrq()

void mrf24wgDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 134 of file mrf24wg_driver.c.

◆ mrf24wgEnableIrq()

void mrf24wgEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 124 of file mrf24wg_driver.c.

◆ mrf24wgEventHandler()

void mrf24wgEventHandler ( NetInterface interface)

MRF24WG event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 144 of file mrf24wg_driver.c.

◆ mrf24wgInit()

error_t mrf24wgInit ( NetInterface interface)

MRF24WG initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 83 of file mrf24wg_driver.c.

◆ mrf24wgSendPacket()

error_t mrf24wgSendPacket ( NetInterface interface,
const NetBuffer buffer,
size_t  offset,
NetTxAncillary ancillary 
)

Send a packet.

Parameters
[in]interfaceUnderlying network interface
[in]bufferMulti-part buffer containing the data to send
[in]offsetOffset to the first data byte
[in]ancillaryAdditional options passed to the stack along with the packet
Returns
Error code

Definition at line 159 of file mrf24wg_driver.c.

◆ mrf24wgTick()

void mrf24wgTick ( NetInterface interface)

MRF24WG timer handler.

This routine is periodically called by the TCP/IP stack to handle periodic operations such as polling the link state

Parameters
[in]interfaceUnderlying network interface

Definition at line 114 of file mrf24wg_driver.c.

◆ mrf24wgUpdateMacAddrFilter()

error_t mrf24wgUpdateMacAddrFilter ( NetInterface interface)

Configure MAC address filtering.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 233 of file mrf24wg_driver.c.

◆ WF_ProcessEvent()

void WF_ProcessEvent ( uint8_t  eventType,
uint32_t  eventData 
)

Callback function that handles Wi-Fi events.

Parameters
[in]eventTypeType of notification
[in]eventDataEvent data

Definition at line 274 of file mrf24wg_driver.c.

◆ WF_RxPacketReady()

void WF_RxPacketReady ( void  )

Callback function (packet received)

Definition at line 329 of file mrf24wg_driver.c.

◆ WF_TxComplete()

void WF_TxComplete ( uint8_t *  p)

Callback function (packet transmitted)

Definition at line 354 of file mrf24wg_driver.c.

Variable Documentation

◆ mrf24wgDriver

const NicDriver mrf24wgDriver
void mrf24wgDisableIrq(NetInterface *interface)
Disable interrupts.
void mrf24wgEventHandler(NetInterface *interface)
MRF24WG event handler.
#define TRUE
Definition: os_port.h:50
error_t mrf24wgSendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
void mrf24wgTick(NetInterface *interface)
MRF24WG timer handler.
error_t mrf24wgUpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
void mrf24wgEnableIrq(NetInterface *interface)
Enable interrupts.
#define ETH_MTU
Definition: ethernet.h:116
error_t mrf24wgInit(NetInterface *interface)
MRF24WG initialization.
@ NIC_TYPE_ETHERNET
Ethernet interface.
Definition: nic.h:83