Please take a look at lines 412 and 416 of Adafruit_SI5351.cpp
ASSERT(m_si5351Config.plla_configured = true, ERROR_INVALIDPARAMETER);
These are testing the assignment, not the value, and thus will always be true.
You probably intended:
ASSERT((true==m_si5351Config.plla_configured), ERROR_INVALIDPARAMETER);
(using the equality operator == rather than the assignment operator =)
(and in general, when testing a value, it's best practice to put the constant as the lvalue, which would cause a "assigning to constant" compiler error in the original code).
Simplest (and most legible) code would be:
ASSERT(m_si5351Config.plla_configured, ERROR_INVALIDPARAMETER);
seeing as how plla_configured is a bool
Please take a look at lines 412 and 416 of Adafruit_SI5351.cpp
ASSERT(m_si5351Config.plla_configured = true, ERROR_INVALIDPARAMETER);
These are testing the assignment, not the value, and thus will always be true.You probably intended:
ASSERT((true==m_si5351Config.plla_configured), ERROR_INVALIDPARAMETER);
(using the equality operator == rather than the assignment operator =) (and in general, when testing a value, it's best practice to put the constant as the lvalue, which would cause a "assigning to constant" compiler error in the original code).Simplest (and most legible) code would be:
ASSERT(m_si5351Config.plla_configured, ERROR_INVALIDPARAMETER);
seeing as how plla_configured is a bool