[components/drivers/spi] 增加 sfud flash 设备查找接口

Signed-off-by: MurphyZhao <d2014zjt@163.com>
This commit is contained in:
MurphyZhao
2018-08-16 14:48:46 +08:00
parent d06f9ac9df
commit 651149fcbb
3 changed files with 45 additions and 4 deletions
+3 -2
View File
@@ -36,8 +36,8 @@ extern "C"{
#define RT_SPI_CPOL (1<<1) /* bit[1]:CPOL, clock polarity */
/**
* At CPOL=0 the base value of the clock is zero
* - For CPHA=0, data are captured on the clock's rising edge (low¡úhigh transition)
* and data are propagated on a falling edge (high¡úlow clock transition).
* - For CPHA=0, data are captured on the clock's rising edge (low->high transition)
* and data are propagated on a falling edge (high->low clock transition).
* - For CPHA=1, data are captured on the clock's falling edge and data are
* propagated on a rising edge.
* At CPOL=1 the base value of the clock is one (inversion of CPOL=0)
@@ -118,6 +118,7 @@ struct rt_spi_device
struct rt_spi_bus *bus;
struct rt_spi_configuration config;
void *user_data;
};
#define SPI_DEVICE(dev) ((struct rt_spi_device *)(dev))