Explorar el Código

Merge pull request #18 from heyuanjie87/master

修正邮箱溢出
aozima hace 5 años
padre
commit
319eb36c2b
Se han modificado 2 ficheros con 3 adiciones y 3 borrados
  1. 2 2
      inc/spi_wifi_rw007.h
  2. 1 1
      src/spi_wifi_rw007.c

+ 2 - 2
inc/spi_wifi_rw007.h

@@ -181,14 +181,14 @@ struct rw007_spi
     ALIGN(4)
     rt_uint8_t spi_tx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_TX_POOL_SIZE];
     struct rt_mailbox spi_tx_mb;
-    int spi_tx_mb_pool[SPI_TX_POOL_SIZE + 1];
+    rt_ubase_t spi_tx_mb_pool[SPI_TX_POOL_SIZE + 1];
     
     /* Rx mempool and mailbox */
     struct rt_mempool spi_rx_mp;
     ALIGN(4)
     rt_uint8_t spi_rx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_RX_POOL_SIZE];
     struct rt_mailbox spi_rx_mb;
-    int spi_rx_mb_pool[SPI_RX_POOL_SIZE + 1];
+    rt_ubase_t spi_rx_mb_pool[SPI_RX_POOL_SIZE + 1];
 
     /* response event */
     rt_event_t rw007_cmd_event;

+ 1 - 1
src/spi_wifi_rw007.c

@@ -731,7 +731,7 @@ rt_err_t rt_hw_wifi_init(const char *spi_device_name)
         struct rt_spi_configuration cfg;
         cfg.data_width = 8;
         cfg.mode = RT_SPI_MODE_0 | RT_SPI_MSB; /* SPI Compatible: Mode 0. */
-        cfg.max_hz = 30 * 1000000;             /* 15M 007 max 30M */
+        cfg.max_hz = RW007_SPI_MAX_HZ;             /* 15M 007 max 30M */
         rt_spi_configure(rw007_spi.spi_device, &cfg);
     }