]> git.sur5r.net Git - freertos/blobdiff - Demo/CORTEX_A2F200_SoftConsole/MicroSemi_Code/drivers/mss_ethernet_mac/mss_ethernet_mac.h
Continue work on the SmartFusion web server demo.
[freertos] / Demo / CORTEX_A2F200_SoftConsole / MicroSemi_Code / drivers / mss_ethernet_mac / mss_ethernet_mac.h
index 92729c65ba0c815ae041f4b37999bc7be0aecaea..0757105a5c6af17d383b9099fd86bae9cfd8b197 100644 (file)
@@ -342,37 +342,26 @@ MSS_MAC_get_configuration
 \r
 \r
 /***************************************************************************//**\r
- * Sends a packet to the Ethernet Controller.\r
- * This function writes pacLen bytes of the packet contained in pacData into the\r
- * transmit FIFO of the controller and then activates the transmitter for this\r
- * packet. If space is available in FIFO, the function will return once lBufLen\r
- * bytes of the packet have been placed into the FIFO and the transmitter has been\r
- * started. The function will not wait for the transmission to complete. If space\r
- * is not available in FIFO, the function will keep trying till time_out expires,\r
- * if MSS_MAC_BLOCKING value is given as time_out, function will wait for the\r
- * transmission to complete.\r
- *\r
- * @param pacData       the pointer to the packet data to be transmitted.\r
- * @param pacLen        number of bytes in the packet to be transmitted.\r
- * @param time_out      Time out value for transmision.\r
- *                                         If value is #MSS_MAC_BLOCKING, there will be no time out.\r
- *                                     If value is #MSS_MAC_NONBLOCKING, function will return immediately \r
- *                                     on buffer full case.\r
- *                                     Otherwise value must be greater than 0 and smaller than \r
- *                                     0x01000000.\r
- * @return                             Returns 0 if time out occurs otherwise returns size \r
- *                                             of the packet.\r
- * @see   MAC_rx_packet()\r
+  Sends a packet from the uIP stack to the Ethernet Controller.\r
+  The MSS_MAC_tx_packet() function is used to send a packet to the MSS Ethernet\r
+  MAC. This function writes uip_len bytes of the packet contained in uip_buf into\r
+  the transmit FIFO and then activates the transmitter for this packet. If space\r
+  is available in the FIFO, the function will return once pac_len bytes of the\r
+  packet have been placed into the FIFO and the transmitter has been started.\r
+  This function will not wait for the transmission to complete.\r
+\r
+  @return\r
+    The function returns zero if a timeout occurs otherwise it returns size of the packet.\r
+\r
+  @see   MAC_rx_packet()\r
  */\r
+\r
 int32_t\r
 MSS_MAC_tx_packet\r
 (\r
-    const uint8_t *pacData,\r
-    uint16_t pacLen,\r
-    uint32_t time_out\r
+    unsigned short usLength\r
 );\r
 \r
-\r
 /***************************************************************************//**\r
  * Returns available packet's size.\r
  *\r
@@ -401,25 +390,11 @@ MSS_MAC_prepare_rx_descriptor
 );\r
 \r
 /***************************************************************************//**\r
- * Receives a packet from the Ethernet Controller.\r
+ * Receives a packet from the Ethernet Controller into the uIP stack.\r
  * This function reads a packet from the receive FIFO of the controller and\r
- * places it into pacData. If time_out parameter is zero the function will return \r
- * immediately (after the copy operation if data is available. Otherwise the function\r
- * will keep trying to read till time_out expires or data is read, if MSS_MAC_BLOCKING \r
- * value is given as time_out, function will wait for the reception to complete.\r
- *\r
- * @param pacData       The pointer to the buffer where received packet data will\r
- *                      be copied. Memory for the buffer should be allocated prior \r
- *                      to calling this function.\r
- * @param pacLen        Size of the buffer, which the received data will be copied in,\r
- *                      given in number of bytes.\r
- * @param time_out      Time out value in milli seconds for receiving.\r
- *                                         if value is #MSS_MAC_BLOCKING, there will be no time out.\r
- *                                         if value is #MSS_MAC_NONBLOCKING, function will return immediately\r
- *                                         if there is no packet waiting.\r
- *                                         Otherwise value must be greater than 0 and smaller than \r
- *                                         0x01000000.\r
- * @return              Size of packet if packet fits in pacData.\r
+ * places it into uip_buf.\r
+\r
+ * @return              Size of packet if packet fits in uip_buf.\r
  *                                         0 if there is no received packet.\r
  * @see   MAC_rx_pckt_size()\r
  * @see   MAC_tx_packet()\r
@@ -427,9 +402,7 @@ MSS_MAC_prepare_rx_descriptor
 int32_t\r
 MSS_MAC_rx_packet\r
 (\r
-    uint8_t **pacData,\r
-    uint16_t pacLen,\r
-    uint32_t time_out\r
+       void\r
 );\r
 \r
 \r
@@ -587,6 +560,23 @@ MSS_MAC_get_statistics
        mss_mac_statistics_id_t stat_id\r
 );\r
 \r
+/*\r
+ * Ensure uip_buf is pointing to a valid and free buffer before any transmissions\r
+ * initiated by the uIP stack occur.
+ */\r
+unsigned char *MSS_MAC_GetTxDescriptor( void );\r
+\r
+/*\r
+ * A buffer is no longer required by the application.  Hand it back to the\r
+ * control of the MAC hardware.
+ */\r
+void MSS_MAC_ReleaseBuffer( unsigned char *pucBuffer );\r
+\r
+/*\r
+ * The double Tx has completed.  Hand back the Tx buffer to the control of\r
+ * the MAC hardware.
+ */\r
+void MSS_MAC_TxBufferCompleted( void );\r
 #ifdef __cplusplus\r
 }\r
 #endif\r