mikroSDK Reference Manual
mrf24wg_driver.h
Go to the documentation of this file.
1
31#ifndef _MRF24WG_DRIVER_H
32#define _MRF24WG_DRIVER_H
33
34//Dependencies
35#include "core/nic.h"
36
37//TX buffer size
38#ifndef MRF24WG_TX_BUFFER_SIZE
39 #define MRF24WG_TX_BUFFER_SIZE 1536
40#elif (MRF24WG_TX_BUFFER_SIZE != 1536)
41 #error MRF24WG_TX_BUFFER_SIZE parameter is not valid
42#endif
43
44//RX buffer size
45#ifndef MRF24WG_RX_BUFFER_SIZE
46 #define MRF24WG_RX_BUFFER_SIZE 1536
47#elif (MRF24WG_RX_BUFFER_SIZE != 1536)
48 #error MRF24WG_RX_BUFFER_SIZE parameter is not valid
49#endif
50
51//C++ guard
52#ifdef __cplusplus
53extern "C" {
54#endif
55
56
61typedef struct
62{
63 bool_t used;
64 size_t length;
65 uint8_t data[MRF24WG_TX_BUFFER_SIZE];
67
68
69//MRF24WG driver
70extern const NicDriver mrf24wgDriver;
71
72//MRF24WG related functions
73error_t mrf24wgInit(NetInterface *interface);
74
75void mrf24wgTick(NetInterface *interface);
76
77void mrf24wgEnableIrq(NetInterface *interface);
78void mrf24wgDisableIrq(NetInterface *interface);
79void mrf24wgEventHandler(NetInterface *interface);
80
81error_t mrf24wgSendPacket(NetInterface *interface,
82 const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary);
83
84error_t mrf24wgUpdateMacAddrFilter(NetInterface *interface);
85
86void mrf24wgAppWifiEvent(uint8_t msgType, void *msg);
87void mrf24wgAppEthEvent(uint8_t msgType, void *msg, void *ctrlBuf);
88
89//C++ guard
90#ifdef __cplusplus
91}
92#endif
93
94#endif
error_t
Error codes.
Definition error.h:43
Network interface controller abstraction layer.
TX buffer.
Definition mrf24wg_driver.h:62
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89
NIC driver.
Definition nic.h:283