Visitor II
April 15, 2018
Question
c++ object not available outside main.cpp file
- April 15, 2018
- 1 reply
- 973 views
Posted on April 16, 2018 at 01:39
I've got a simple c++ class (LEDDriver) that has an internal state that will eventually be updated by a state machine. I've created an update() member function that will handle turning the LEDs off and on, it just needs to be called in an interrupt.
In my main function, I initialize LED as a LEDDriver object with a global scope, but am unable to call this object from within my stm32l0xx_it.cpp even with main.h and LEDDriver.h included.
Does anyone know why this would not work?
I've attached both the whole project as well as just the code pertaining to the question.
#interrupts #c++