我有一台基于 arm 的计算机,装有 armbian 操作系统,还有一台 LCD,我想用 SPI 协议连接它。当我使用此命令时:
sudo modprobe fbtft_device custom name=fb_ili9341 gpios=reset:198,dc:201,led:6 speed=16000000 rotate=90 bgr=1
我收到此错误dmesg
:
[ 68.421997] fbtft_device: SPI devices registered:
[ 68.422019] fbtft_device: spidev spi0.0 33000kHz 8 bits mode=0x00
[ 68.422029] fbtft_device: 'fb' Platform devices registered:
[ 68.422115] fbtft_device: Deleting spi0.0
[ 68.422631] fbtft_device: GPIOS used by 'fb_ili9341':
[ 68.422648] fbtft_device: 'reset' = GPIO198
[ 68.422656] fbtft_device: 'dc' = GPIO201
[ 68.422662] fbtft_device: 'led' = GPIO6
[ 68.422669] fbtft_device: SPI devices registered:
[ 68.422679] fbtft_device: fb_ili9341 spi0.0 16000kHz 8 bits mode=0x00
[ 68.433490] fb_ili9341 spi0.0: fbtft_request_gpios: gpio_request_one('reset'=198) failed with -16
[ 68.433657] fb_ili9341: probe of spi0.0 failed with error -16
我在这里检查了错误编号http://lxr.free-electrons.com/source/include/uapi/asm-generic/errno-base.h#L15并且它说:Device or resource busy
但是引脚是免费的,更换引脚并不能解决问题!
我怎样才能解决这个问题?
答案1
#gpio_sunxi
我确实在文件中注释了此行/etc/modules
,问题解决了!