完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
static int st7789v_spi_probe_l(struct spi_device *spi)
{ int ret = 0; //int set_bl; assist_lcd_spi_device_l = *spi; printk("st7789v_spi_probe_l st7789v_max_speed %d" ,spi->max_speed_hz); printk("chip_select %d--master %dn",spi->chip_select,spi->master->bus_num);// bits_per_word %s mode %u printk("bits_per_word %d---mode %dn",spi->bits_per_word,spi->mode); printk("bits_per_word %d---mode %dn",assist_lcd_spi_device_l.bits_per_word,assist_lcd_spi_device_l.mode); memset(&assist_lcd_info, 0, sizeof(assist_lcd_info_t)); assist_lcd_info.dev_l = &spi->dev; SPI_Init(&assist_lcd_spi_device_l); #if USED_FORE_LINE_8Bit_MODE ret = gpio_request(SPI_MISO_PIN,"SPI_LCD_MISO_WR"); if(ret < 0){ printk("gpio quest fail %d n",SPI_MISO_PIN); return -1; } gpio_direction_output(SPI_MISO_PIN, 1); #endif ret = gpio_request(LCD_CS_R_PIN,"LCD_CS_R_PIN"); if(ret < 0){ printk("gpio quest fail %d n",LCD_CS_R_PIN); return -1; } gpio_direction_output(LCD_CS_R_PIN, 1); ret = gpio_request(LCD_CS_L_PIN,"LCD_CS_L_PIN"); if(ret < 0){ printk("gpio quest fail %d n",LCD_CS_L_PIN); return -1; } gpio_direction_output(LCD_CS_L_PIN, 1); ret = gpio_request(LCD_RST_PIN,"SPI_LCD_RST"); if(ret < 0){ printk("LCD_RST_PIN gpio quest fail %d n",LCD_RST_PIN); return -1; } gpio_direction_output(LCD_RST_PIN, 1); ret = gpio_request(LCD_BL_PIN,"SPI_LCD_BL"); if(ret < 0){ printk("gpio quest fail %d n",LCD_BL_PIN); return -1; } gpio_direction_output(LCD_BL_PIN, 0); ret = gpio_request(GPIO_RESVE3,"GPIO_RESVE3"); if(ret < 0){ printk("gpio quest fail %d n",GPIO_RESVE3); return -1;} } |
|
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
谁有3566+电池+POE充电的方案,有个项目需要用该功能的主板
880 浏览 0 评论
RK3588的GMAC0与PHY的参考时钟电平匹配问题??????
4677 浏览 1 评论
请问各位大佬,如何解决,瑞芯微 RV1126B 使用 mpp 自带工具 调试时,内核直接报错崩溃!
1833 浏览 0 评论
使用rk3568开发板,核0\\1\\3运行linux,核2运行hal,在核0中怎么关闭核2
2393 浏览 0 评论
2395 浏览 0 评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-3 08:04 , Processed in 0.864093 second(s), Total 73, Slave 54 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
2113