Giter VIP home page Giter VIP logo

Comments (10)

FASTSHIFT avatar FASTSHIFT commented on July 21, 2024

@konosubakonoakua 您使用的是STM32F0系列吗?
这个 portOutputRegister(digitalPinToPort(pin))函数 返回的是GPIO的ODR寄存器地址。
STM32F0系列的单片机的GPIO的ODR寄存器是16位的,而其他STM32系列是32位的,所以才有这个报错。
建议解决办法:
在Adafruit_SSD1306.h文件里的第45行:

#elif defined(__STM32__)
  typedef volatile uint32_t PortReg;
  typedef uint16_t PortMask;
#define HAVE_PORTREG

修改为:

#elif defined(__STM32__)
  #if defined(__STM32F0__)
    typedef volatile uint16_t PortReg;
  #else
    typedef volatile uint32_t PortReg;
  #endif
  typedef uint16_t PortMask;
#define HAVE_PORTREG

不建议使用强制转换

from arduino-for-keil.

konosubakonoakua avatar konosubakonoakua commented on July 21, 2024

我用的f1🤣

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on July 21, 2024

@konosubakonoakua
感谢提交问题,Adafruit_SSD1306库已重新上传,您可以再编译一下试试

from arduino-for-keil.

GavinOUYANG avatar GavinOUYANG commented on July 21, 2024

@konosubakonoakua
感谢提交问题,Adafruit_SSD1306库已重新上传,您可以再编译一下试试

请问为什么编译成功但是就没有图案显示

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on July 21, 2024

@GavinOUYANG 尝试多初始化几次

from arduino-for-keil.

GavinOUYANG avatar GavinOUYANG commented on July 21, 2024

@GavinOUYANG 尝试多初始化几次

不知道大佬有没有添加号显示器库的历程,试过u8g2也是不行,谢谢了

from arduino-for-keil.

GavinOUYANG avatar GavinOUYANG commented on July 21, 2024

@GavinOUYANG 尝试多初始化几次

就简单显示一个英文就行了,搞了两三天还是不行,谢谢了

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on July 21, 2024

@GavinOUYANG 库自带的例程就可以用

from arduino-for-keil.

FASTSHIFT avatar FASTSHIFT commented on July 21, 2024

@GavinOUYANG 您用的是I2C屏吗,可以尝试降低I2C速度,在Wire.h文件里有一个#define FULL_SPEED_I2C,把它注释掉。还有检查一下屏幕的I2C地址,是否和库设置的地址匹配。

from arduino-for-keil.

GavinOUYANG avatar GavinOUYANG commented on July 21, 2024

@GavinOUYANG 您用的是I2C屏吗,可以尝试降低I2C速度,在Wire.h文件里有一个#define FULL_SPEED_I2C,把它注释掉。还有检查一下屏幕的I2C地址,是否和库设置的地址匹配。

好的谢谢

from arduino-for-keil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.