spi bits per word在传输上指的两个片选有效期间传输的bit位数 #define SPI_BPW_MASK(bits) BIT((bits) - 1) driver/spi/spi.c中检查,是否支持从设备的bits per word
下面是driver/spi/spi-imx.c,可以看出支持1到32位的bits #define BIT(nr) (1UL << (nr)) #define SPI_BPW_MASK(bits) BIT((bits) - 1) #define SPI_BIT_MASK(bits) (((bits) == 32) ? ~0U : (BIT(bits) - 1)) #define SPI_BPW_RANGE_MASK(min, max) (SPI_BIT_MASK(max) - SPI_BIT_MASK(min - 1))
下面是driver/spi/spi-phytium.c,可以看出飞腾的spi master支持8和16位的bits #define SPI_BPW_MASK(bits) BIT((bits) - 1)
标签:word,driver,spi,宽度,BIT,bits,define From: https://www.cnblogs.com/wangwangever/p/17989480