Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Bypass Mode

         Here are listed all the functions that implement the Bypass Mode APIs.

Functions

NMI_API sint8 m2m_wifi_enable_mac_mcast (uint8 *pu8MulticastMacAddress, uint8 u8AddRemove)
 Add MAC filter to receive Multicast packets. More...
 
sint8 m2m_wifi_send_ethernet_pkt (uint8 *pu8Packet, uint16 u16PacketSize)
 Synchronous function to transmit an Ethernet packet. More...
 
NMI_API sint8 m2m_wifi_set_receive_buffer (void *pvBuffer, uint16 u16BufferLen)
 set the ethernet receive buffer, should be called in the receive call back. More...
 

NMI_API sint8 m2m_wifi_enable_mac_mcast ( uint8 pu8MulticastMacAddress,
uint8  u8AddRemove 
)

Add MAC filter to receive Multicast packets.

Asynchronous API to add or remove MAC addresses to the multicast filter.

Synchronous function for filtering received MAC addresses.

Parameters
[in]pu8MulticastMacAddressPointer to the MAC address.
[in]u8AddRemoveFlag to Add/Remove MAC address.
Returns
The function SHALL return 0 for success and a negative value otherwise.
Synchronous function for filtering received MAC addresses from certain MAC address groups.
This function allows the addition/removal of certain MAC addresses, used in the multicast filter.
Parameters
[in]pu8MulticastMacAddressPointer to MAC address
[in]u8AddRemoveA flag to add or remove the MAC ADDRESS, based on the following values:
  • 0 : remove MAC address
  • 1 : add MAC address
Note
Maximum number of MAC addresses that could be added is 8.
Warning
This function is available in ETHERNET/bypass mode ONLY. Make sure that the application defines ETH_MODE.
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
See Also
m2m_wifi_set_receive_buffer m2m_wifi_send_ethernet_pkt
This function will configure the WINC to receive/ignore multicast packets from certain
MAC address groups when operating in bypass mode.
This function requests the given MAC addresses to be added/removed from the multicast filter.
Parameters
[in]pu8MulticastMacAddressPointer to MAC address
[in]u8AddRemoveA flag to add or remove the MAC ADDRESS, based on the following values:
  • 0 : remove MAC address
  • 1 : add MAC address
Note
Maximum number of MAC addresses that could be added is 8.
Warning
This function is available in ETHERNET/bypass mode ONLY. Make sure that the application defines ETH_MODE.
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
See Also
m2m_wifi_set_receive_buffer m2m_wifi_send_ethernet_pkt

Referenced by os_m2m_wifi_enable_mac_mcast_imp().

NMI_API sint8 m2m_wifi_send_ethernet_pkt ( uint8 pu8Packet,
uint16  u16PacketSize 
)

Synchronous function to transmit an Ethernet packet.

Asynchronous API to queue an Ethernet packet for transmission by the WINC.

Transmit a packet directly in ETHERNET/bypass mode where the TCP/IP stack is disabled 
and the implementation of this packet is left to the application developer. 
The Ethernet packet composition is left to the application developer. 
Note
Packets are the user's responsibility.
Warning
This function available in ETHERNET/Bypass mode ONLY. Make sure that application defines ETH_MODE.
Parameters
[in]pu8PacketPointer to a buffer holding the whole Ethernet frame.
[in]u16PacketSizeThe size of the whole packet in bytes.
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
See Also
m2m_wifi_enable_mac_mcast m2m_wifi_set_receive_buffer
Transmit a packet directly in ETHERNET/bypass mode where the TCP/IP stack is disabled
and the implementation of this packet is left to the application developer.
The Ethernet packet composition is left to the application developer.
Note
Packets are the user's responsibility.
Warning
This function available in ETHERNET/Bypass mode ONLY. Make sure that application defines ETH_MODE.
Parameters
[in]pu8PacketPointer to a buffer holding the whole Ethernet frame.
[in]u16PacketSizeThe size of the whole packet in bytes.
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
See Also
m2m_wifi_enable_mac_mcast m2m_wifi_set_receive_buffer
NMI_API sint8 m2m_wifi_set_receive_buffer ( void *  pvBuffer,
uint16  u16BufferLen 
)

set the ethernet receive buffer, should be called in the receive call back.

Synchronous function for setting or modifying the receiver buffer's length.

Parameters
[in]pvBufferPointer to the ethernet receive buffer.
[in]u16BufferLenLength of the buffer.
Returns
The function SHALL return 0 for success and a negative value otherwise.
Synchronous function for setting or modifying the receiver buffer's length. 
In the ETHERNET/bypass mode the application should define a callback of type 
@ref tpfAppEthCb, through which the application handles the received 
ethernet frames. It is through this callback function that the user can 
dynamically modify the length of the currently used receiver buffer.
Parameters
[in]pvBufferPointer to Buffer to receive data. NULL pointer causes a negative error M2M_ERR_FAIL.
[in]u16BufferLenLength of data to be received. Maximum length of data should not exceed the size defined by TCP/IP defined as SOCKET_BUFFER_MAX_LENGTH
Warning
This function is available in the Ethernet/bypass mode ONLY. Make sure that the application defines ETH_MODE.
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
See Also
m2m_wifi_enable_mac_mcast m2m_wifi_send_ethernet_pkt
Synchronous function for setting or modifying the receiver buffer's length.
In the ETHERNET/bypass mode the application should define a callback of type
@ref tpfAppEthCb, through which the application handles the received
ethernet frames. It is through this callback function that the user can
dynamically modify the length of the currently used receiver buffer.
Parameters
[in]pvBufferPointer to Buffer to receive data. NULL pointer causes a negative error M2M_ERR_FAIL.
[in]u16BufferLenLength of data to be received. Maximum length of data should not exceed the size defined by TCP/IP defined as SOCKET_BUFFER_MAX_LENGTH
Warning
This function is available in the Ethernet/bypass mode ONLY. Make sure that the application defines ETH_MODE.
Returns
The function returns M2M_SUCCESS if the command has been successfully queued to the WINC and a negative value otherwise.
See Also
m2m_wifi_enable_mac_mcast m2m_wifi_send_ethernet_pkt

Referenced by os_m2m_wifi_set_receive_buffer_imp().