cc33xx_driver.c File Reference

CC3300/CC3301 Wi-Fi controller. More...

#include <stdint.h>
#include "wlan_if.h"
#include "errors.h"
#include "core/net.h"
#include "drivers/wifi/cc33xx_driver.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   NIC_TRACE_LEVEL
 

Functions

void cc33xxEventCallback (WlanEvent_t *event)
 WLAN event callback function. More...
 
void cc33xxStaRxCallback (WlanRole_e role, uint8_t *data, uint32_t length)
 Process incoming packets (STA interface) More...
 
void cc33xxApRxCallback (WlanRole_e role, uint8_t *data, uint32_t length)
 Process incoming packets (AP interface) More...
 
error_t cc33xxInit (NetInterface *interface)
 CC33xx initialization. More...
 
void cc33xxTick (NetInterface *interface)
 CC33xx timer handler. More...
 
void cc33xxEnableIrq (NetInterface *interface)
 Enable interrupts. More...
 
void cc33xxDisableIrq (NetInterface *interface)
 Disable interrupts. More...
 
void cc33xxEventHandler (NetInterface *interface)
 CC33xx event handler. More...
 
error_t cc33xxSendPacket (NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
 Send a packet. More...
 
error_t cc33xxUpdateMacAddrFilter (NetInterface *interface)
 Configure MAC address filtering. More...
 

Variables

NetInterfacecc33xxStaInterface = NULL
 
NetInterfacecc33xxApInterface = NULL
 
const NicDriver cc33xxStaDriver
 CC33xx driver (STA mode) More...
 
const NicDriver cc33xxApDriver
 CC33xx driver (AP mode) More...
 

Detailed Description

CC3300/CC3301 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 cc33xx_driver.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   NIC_TRACE_LEVEL

Definition at line 32 of file cc33xx_driver.c.

Function Documentation

◆ cc33xxApRxCallback()

void cc33xxApRxCallback ( WlanRole_e  role,
uint8_t *  data,
uint32_t  length 
)

Process incoming packets (AP interface)

Parameters
[in]roleWLAN role
[in]dataPointer to the received packet
[in]lengthLength of the packet, in bytes

Definition at line 436 of file cc33xx_driver.c.

◆ cc33xxDisableIrq()

void cc33xxDisableIrq ( NetInterface interface)

Disable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 257 of file cc33xx_driver.c.

◆ cc33xxEnableIrq()

void cc33xxEnableIrq ( NetInterface interface)

Enable interrupts.

Parameters
[in]interfaceUnderlying network interface

Definition at line 247 of file cc33xx_driver.c.

◆ cc33xxEventCallback()

void __weak_func cc33xxEventCallback ( WlanEvent_t *  event)

WLAN event callback function.

Parameters
[in]eventPointer to the event object

Definition at line 355 of file cc33xx_driver.c.

◆ cc33xxEventHandler()

void cc33xxEventHandler ( NetInterface interface)

CC33xx event handler.

Parameters
[in]interfaceUnderlying network interface

Definition at line 267 of file cc33xx_driver.c.

◆ cc33xxInit()

error_t cc33xxInit ( NetInterface interface)

CC33xx initialization.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 108 of file cc33xx_driver.c.

◆ cc33xxSendPacket()

error_t cc33xxSendPacket ( 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 282 of file cc33xx_driver.c.

◆ cc33xxStaRxCallback()

void cc33xxStaRxCallback ( WlanRole_e  role,
uint8_t *  data,
uint32_t  length 
)

Process incoming packets (STA interface)

Parameters
[in]roleWLAN role
[in]dataPointer to the received packet
[in]lengthLength of the packet, in bytes

Definition at line 404 of file cc33xx_driver.c.

◆ cc33xxTick()

void cc33xxTick ( NetInterface interface)

CC33xx 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 237 of file cc33xx_driver.c.

◆ cc33xxUpdateMacAddrFilter()

error_t cc33xxUpdateMacAddrFilter ( NetInterface interface)

Configure MAC address filtering.

Parameters
[in]interfaceUnderlying network interface
Returns
Error code

Definition at line 340 of file cc33xx_driver.c.

Variable Documentation

◆ cc33xxApDriver

const NicDriver cc33xxApDriver
Initial value:

CC33xx driver (AP mode)

Definition at line 81 of file cc33xx_driver.c.

◆ cc33xxApInterface

NetInterface* cc33xxApInterface = NULL

Definition at line 44 of file cc33xx_driver.c.

◆ cc33xxStaDriver

const NicDriver cc33xxStaDriver
Initial value:

CC33xx driver (STA mode)

Definition at line 56 of file cc33xx_driver.c.

◆ cc33xxStaInterface

NetInterface* cc33xxStaInterface = NULL

Definition at line 43 of file cc33xx_driver.c.

void cc33xxTick(NetInterface *interface)
CC33xx timer handler.
#define TRUE
Definition: os_port.h:50
error_t cc33xxInit(NetInterface *interface)
CC33xx initialization.
void cc33xxDisableIrq(NetInterface *interface)
Disable interrupts.
error_t cc33xxSendPacket(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet.
void cc33xxEventHandler(NetInterface *interface)
CC33xx event handler.
void cc33xxEnableIrq(NetInterface *interface)
Enable interrupts.
#define ETH_MTU
Definition: ethernet.h:116
error_t cc33xxUpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
@ NIC_TYPE_ETHERNET
Ethernet interface.
Definition: nic.h:83