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

I2C_ONE / I2C_TWO are not declared but the HW_I2C enum is? #373

Open
H3wastooshort opened this issue Jul 28, 2022 · 0 comments
Open

I2C_ONE / I2C_TWO are not declared but the HW_I2C enum is? #373

H3wastooshort opened this issue Jul 28, 2022 · 0 comments

Comments

@H3wastooshort
Copy link

H3wastooshort commented Jul 28, 2022

Describe the bug
Trying to define the I2C clockspeed i have to put in I2C_ONE / I2C_TWO but those are not defined even when includeing OLEDDisplay.h

#include <OLEDDisplay.h>
#include <SSD1306Wire.h>

SSD1306Wire oled(0x3c, 0, 2, GEOMETRY_128_64, I2C_ONE, 200000);

void setup() {}
void loop() {}

results in

exit status 1
'I2C_ONE' was not declared in this scope

====

#include <OLEDDisplay.h>
#include <SSD1306Wire.h>

enum HW_I2C {
  I2C_ONE,
  I2C_TWO
};
SSD1306Wire oled(0x3c, 0, 2, GEOMETRY_128_64, I2C_ONE, 200000);

void setup() {}
void loop() {}

results in

exit status 1
multiple definition of 'enum HW_I2C'

====

#include <OLEDDisplay.h>
#include <SSD1306Wire.h>

SSD1306Wire oled(0x3c, 0, 2, GEOMETRY_128_64, (HW_I2C)1, 200000);

void setup() {}
void loop() {}

results in

exit status 1
'HW_I2C' was not declared in this scope

im kinda confused. its defined and not defined at the same time.

Versions (please complete the following information):

  • Library: [e.g. 4.3]
  • Platform [e.g. ESP32 Arduino Core 2.0.3]
@H3wastooshort H3wastooshort changed the title I2C_ONE / I2C_TWO are not declared I2C_ONE / I2C_TWO are not declared but the HW_I2C enum is? Jul 28, 2022
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

1 participant