Ver código fonte

Merge pull request #19 from aozima/aozima_dev

修正拼写错误并更新数组对齐属性,以更好适应64位平台
aozima 5 anos atrás
pai
commit
532c70e485
2 arquivos alterados com 5 adições e 5 exclusões
  1. 4 4
      inc/spi_wifi_rw007.h
  2. 1 1
      src/spi_wifi_rw007.c

+ 4 - 4
inc/spi_wifi_rw007.h

@@ -178,14 +178,14 @@ struct rw007_spi
 
 
     /* Tx mempool and mailbox */
     /* Tx mempool and mailbox */
     struct rt_mempool spi_tx_mp;
     struct rt_mempool spi_tx_mp;
-    ALIGN(4)
+    ALIGN(RT_ALIGN_SIZE)
     rt_uint8_t spi_tx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_TX_POOL_SIZE];
     rt_uint8_t spi_tx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_TX_POOL_SIZE];
     struct rt_mailbox spi_tx_mb;
     struct rt_mailbox spi_tx_mb;
     rt_ubase_t 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 */
     /* Rx mempool and mailbox */
     struct rt_mempool spi_rx_mp;
     struct rt_mempool spi_rx_mp;
-    ALIGN(4)
+    ALIGN(RT_ALIGN_SIZE)
     rt_uint8_t spi_rx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_RX_POOL_SIZE];
     rt_uint8_t spi_rx_mempool[(sizeof(struct spi_data_packet) + 4) * SPI_RX_POOL_SIZE];
     struct rt_mailbox spi_rx_mb;
     struct rt_mailbox spi_rx_mb;
     rt_ubase_t spi_rx_mb_pool[SPI_RX_POOL_SIZE + 1];
     rt_ubase_t spi_rx_mb_pool[SPI_RX_POOL_SIZE + 1];
@@ -193,7 +193,7 @@ struct rw007_spi
     /* response event */
     /* response event */
     rt_event_t rw007_cmd_event;
     rt_event_t rw007_cmd_event;
     /* response data */
     /* response data */
-    struct rw007_resp * resp[RW00x_CMD_MAX_NUM];
+    struct rw007_resp *resp[RW00x_CMD_MAX_NUM];
 };
 };
 
 
 #define RW00x_CMD_RESP_EVENT(n)     (0x01UL << n)
 #define RW00x_CMD_RESP_EVENT(n)     (0x01UL << n)

+ 1 - 1
src/spi_wifi_rw007.c

@@ -760,7 +760,7 @@ rt_err_t rt_hw_wifi_init(const char *spi_device_name)
     rt_mb_init(&rw007_spi.spi_rx_mb,
     rt_mb_init(&rw007_spi.spi_rx_mb,
                "spi_rx",
                "spi_rx",
                &rw007_spi.spi_rx_mb_pool[0],
                &rw007_spi.spi_rx_mb_pool[0],
-               SPI_TX_POOL_SIZE,
+               SPI_RX_POOL_SIZE,
                RT_IPC_FLAG_PRIO);
                RT_IPC_FLAG_PRIO);
 
 
     /* init spi data notify event */
     /* init spi data notify event */