Wireless Device Driver Implementation
All device drivers must declare an instance of the appropriate device driver API structure as a global variable within the source code. The API structure is an ordered list of function pointers utilized by µC/TCP-IP when device hardware services are required.
A sample Ethernet interface API structure is shown below.
Listing 7-24 Ethernet interface API
Note: It is the device driver developers’ responsibility to ensure that all of the functions listed within the API are properly implemented and that the order of the functions within the API structure is correct.
L7-24(1) Device initialization/add function pointer
L7-24(2) Device start function pointer
L7-24(3) Device stop function pointer
L7-24(4) Device Receive function pointer
L7-24(5) Device transmit function pointer
L7-24(6) Device multicast address add function pointer
L7-24(7) Device multicast address remove function pointer
L7-24(8) Device interrupt service routine (ISR) handler function pointer
L7-24(9) Device demultiplex management frame function pointer.
L7-24(10) Device execute management command function pointer.
L7-24(11) Device process management response function pointer.
...
- How to Access the SPI Bus
- Initializing a Network Device (Wireless)
- Starting a Network Device (Wireless)
- Stopping a Network Device (Wireless)
- Handling a Wireless Device ISR
- Receiving Packets and Management Frames
- Transmitting Packets (Wireless)
- Adding an Address to the Multicast Address Filter of a Network Device (Wireless)
- Removing an Address from the Multicast Address Filter of a Network Device (Wireless)
- How to Demultiplex Management Frames
- How to Execute Management Command
- How to Process Management Response