summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2015-08-31 17:19:07 +0800
committerBernard Xiong <[email protected]>2015-08-31 17:19:07 +0800
commitec87b910114ef76abb50d899f9eb3e1a02df69e8 (patch)
tree6a6f1a8b5e469d7ae1f901d173a35b811376d53f /components/drivers
parent4a6647432937f60256ffc6db504f2d75c792396a (diff)
parent918250d7bd4f531a399a331e914921928b266813 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/serial/serial.c3
-rw-r--r--components/drivers/spi/spi_flash_w25qxx.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c
index 8744aa4657..f5a199e10b 100644
--- a/components/drivers/serial/serial.c
+++ b/components/drivers/serial/serial.c
@@ -27,6 +27,8 @@
* the size of ring buffer.
* 2014-07-10 bernard rewrite serial framework
* 2014-12-31 bernard use open_flag for poll_tx stream mode.
+ * 2015-05-19 Quintin fix DMA tx mod tx_dma->activated flag !=RT_FALSE BUG
+ * in open function.
*/
#include <rthw.h>
@@ -302,6 +304,7 @@ static rt_err_t rt_serial_open(struct rt_device *dev, rt_uint16_t oflag)
tx_dma = (struct rt_serial_tx_dma*) rt_malloc (sizeof(struct rt_serial_tx_dma));
RT_ASSERT(tx_dma != RT_NULL);
+ tx_dma->activated = RT_FALSE;
rt_data_queue_init(&(tx_dma->data_queue), 8, 4, RT_NULL);
serial->serial_tx = tx_dma;
diff --git a/components/drivers/spi/spi_flash_w25qxx.c b/components/drivers/spi/spi_flash_w25qxx.c
index 6e002c38c8..2237b971c4 100644
--- a/components/drivers/spi/spi_flash_w25qxx.c
+++ b/components/drivers/spi/spi_flash_w25qxx.c
@@ -34,6 +34,7 @@
#define GD_ID (0xC8)
/* JEDEC Device ID: Memory type and Capacity */
+#define MTC_W25Q80_BV (0x4014) /* W25Q80BV */
#define MTC_W25Q16_BV_CL_CV (0x4015) /* W25Q16BV W25Q16CL W25Q16CV */
#define MTC_W25Q16_DW (0x6015) /* W25Q16DW */
#define MTC_W25Q32_BV (0x4016) /* W25Q32BV */
@@ -349,6 +350,11 @@ rt_err_t w25qxx_init(const char * flash_device_name, const char * spi_device_nam
FLASH_TRACE("W25Q16DW detection\r\n");
spi_flash_device.geometry.sector_count = 512;
}
+ else if(memory_type_capacity == MTC_W25Q80_BV)
+ {
+ FLASH_TRACE("W25Q80BV detection\r\n");
+ spi_flash_device.geometry.sector_count = 256;
+ }
else
{
FLASH_TRACE("Memory Capacity error!\r\n");