Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于驱动使用的一些疑问 #25

Open
ZHH-start opened this issue Aug 29, 2024 · 1 comment
Open

关于驱动使用的一些疑问 #25

ZHH-start opened this issue Aug 29, 2024 · 1 comment

Comments

@ZHH-start
Copy link

ZHH-start commented Aug 29, 2024

第一个问题

驱动抽象化极佳,但我有一些使用上的小细节不太明白,我没能成功驱动单色OLED屏幕,因此希望得到您的帮助。
image
我使用IIC驱动OLED,事先已经配置好了IIC驱动,并且做了部分移植。如图,这样的使用方法是对的吗?

第二个问题

image
image
image

我确定通讯正常进行,因为从机一直在应答。但是实际上屏幕没有显示。由于我没有使用SPI驱动。因此我没有对_interface部分的SPI驱动进行任何修改,同时由于不需要deinit,我也没有添加该部分驱动。请问这是正确的使用方法吗?

image
image

Additional context

在此之前我成功使用其他驱动让OLED屏幕亮起,因此我确信这块屏幕是完全正常的。如果有任何需要我补充说明的部分,请告知我,对您的援助之手不胜感激!

@ZHH-start ZHH-start changed the title 关于驱动使用 关于驱动使用的一些疑问 Aug 29, 2024
@libdriver
Copy link
Owner

Thank you very much for using LibDriver. Based on the information you provided, we have found that the 'ssd1306_interface_iic-write (uint8_t addr, uint8_t reg, uint8_t * buf, uint16_tlen)' function does not seem to have a section for writing the register address, reg is the register address, and when writing data without specifying the register address, the chip will treat the first byte of the data as the register address, causing the entire driver to write incorrectly. You can refer to ssd1306/project/stm32f407/driver/src/stm32f407_driver_ssd1306_interface.c for more information

您好,非常感谢您使用LibDriver驱动。从您提供的信息分析,我们发现ssd1306_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)这个函数,似乎没有reg写入的部分,reg是寄存器地址,当执行写入操作时不指定寄存器地址直接写入数据时,芯片会将数据的第一个字节当做寄存器地址导致整个驱动写入错误,您可以参考ssd1306/project/stm32f407/driver/src/stm32f407_driver_ssd1306_interface.c实现您平台的IIC写入驱动。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants