You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/11/30 16:57:54 UTC

[06/16] incubator-mynewt-core git commit: stm32f4 lwip eth driver; get it to compile, if not operate.

stm32f4 lwip eth driver; get it to compile, if not operate.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/566da38a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/566da38a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/566da38a

Branch: refs/heads/develop
Commit: 566da38aee6302b2548a34cb51f1e7ed24536199
Parents: d541740
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Nov 29 12:39:18 2016 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Wed Nov 30 08:45:23 2016 -0800

----------------------------------------------------------------------
 hw/drivers/lwip/stm32f4_eth/src/stm32f4_eth.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/566da38a/hw/drivers/lwip/stm32f4_eth/src/stm32f4_eth.c
----------------------------------------------------------------------
diff --git a/hw/drivers/lwip/stm32f4_eth/src/stm32f4_eth.c b/hw/drivers/lwip/stm32f4_eth/src/stm32f4_eth.c
index 54c15d3..0660a19 100755
--- a/hw/drivers/lwip/stm32f4_eth/src/stm32f4_eth.c
+++ b/hw/drivers/lwip/stm32f4_eth/src/stm32f4_eth.c
@@ -44,22 +44,22 @@
 /* Private macro -------------------------------------------------------------*/
 /* Private variables ---------------------------------------------------------*/
 #if defined ( __ICCARM__ ) /*!< IAR Compiler */
-  #pragma data_alignment=4   
+  #pragma data_alignment=4
 #endif
 __ALIGN_BEGIN ETH_DMADescTypeDef  DMARxDscrTab[ETH_RXBUFNB] __ALIGN_END;/* Ethernet Rx MA Descriptor */
 
 #if defined ( __ICCARM__ ) /*!< IAR Compiler */
-  #pragma data_alignment=4   
+  #pragma data_alignment=4
 #endif
 __ALIGN_BEGIN ETH_DMADescTypeDef  DMATxDscrTab[ETH_TXBUFNB] __ALIGN_END;/* Ethernet Tx DMA Descriptor */
 
 #if defined ( __ICCARM__ ) /*!< IAR Compiler */
-  #pragma data_alignment=4   
+  #pragma data_alignment=4
 #endif
 __ALIGN_BEGIN uint8_t Rx_Buff[ETH_RXBUFNB][ETH_RX_BUF_SIZE] __ALIGN_END; /* Ethernet Receive Buffer */
 
 #if defined ( __ICCARM__ ) /*!< IAR Compiler */
-  #pragma data_alignment=4   
+  #pragma data_alignment=4
 #endif
 __ALIGN_BEGIN uint8_t Tx_Buff[ETH_TXBUFNB][ETH_TX_BUF_SIZE] __ALIGN_END; /* Ethernet Transmit Buffer */
 
@@ -654,7 +654,9 @@ stm32f4_output(struct netif *nif, struct pbuf *p)
 static void
 stm32f4_eth_isr(void)
 {
+#if 0
     HAL_ETH_IRQHandler(&stmref4_eth_State.st_eth);
+#endif
 }
 
 static err_t
@@ -697,7 +699,9 @@ stm32f4_lwip_init(struct netif *nif)
             if ((cfg->sec_port_mask[i] & (1 << j)) == 0) {
                 continue;
             }
+#if 0
             hal_gpio_init_af(i * 16 + j, GPIO_AF11_ETH, GPIO_NOPULL);
+#endif
         }
     }
 
@@ -706,8 +710,10 @@ stm32f4_lwip_init(struct netif *nif)
     __HAL_RCC_ETH_CLK_ENABLE();
 
     ses->st_eth.Instance = ETH;
-    ses->st_eth.Init.MACAddr = { 0, 1, 2, 3, 4, 5 };
+    ses->st_eth.Init.MACAddr[1] = 2;
+#if 0
     ses->st_eth.Init.Autonegotiation = ETH_AUTONEGOTIATION_ENABLE;
+#endif
     ses->st_eth.Init.Speed = ETH_SPEED_100M;
     ses->st_eth.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
     ses->st_eth.Init.PhyAddress = 0;