Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Transmitting Packets

NetDev_Tx()is used to notify the wireless device that a new packet is available to be transmitted. It performs the following actions:

...

  1. The driver follow the procedure to access the SPI bus, and it takes all necessary steps to initiate transmission of the data by writing to the wireless device’s register using appropriate device’s BSP functions. The driver must configure the device with the number of bytes to transmit. This value contained in the size argument.

...

  1. The driver must write the data stored in the network buffer to the device’s memory. The address of the buffer is specified by p_data which can be passed directly to ‘Write Read’ device’s BSP function pointer.

...

  1. For wireless devices that do not support transmit completed notifications, the packet is assumed to be transmitted successfully, and the driver must perform the following actions.
    • a Post the address of the just-used network buffer to the transmit buffer de-allocation task by calling NetOS_IF_TxDeallocTaskPost() with the pointer p_data.
    • b Call NetOS_Dev_TxRdySignal() with the number of the interface that had just completed transmission.

...

  1. For wireless devices that do support transmit completed notifications, the previous transmit complete steps should be performed by NetDev_MgmtDemux().

...

  1. NetDev_Tx() sets p_err to NET_DEV_ERR_NONE and return from the transmit function.