adafruit / Adafruit_Si5351_Library

Driver for Adafruit's Si5351 Clockgen Breakout
43 stars 30 forks source link

SI5351 library: The errors are not correctly handled. #11

Closed Almisuifre closed 2 years ago

Almisuifre commented 3 years ago

Hi,

After doing all the checks.

If you're sure this issue is a defect in the code and checked the steps above please fill in the following fields to provide enough troubleshooting information. You may delete the guideline and text above to just leave the following details:

Following your example (lines 16-22), I used the piece of code which tests the I²C connection through wire.begin () included in the library's CPP.

I noticed that from the moment the module is not plugged in, no error was found. However in your example, we are seen to see appear "Ooops, no Si5351 detected ... Check your wiring or I2C ADDR!" ; instead the code continues its path to loop ().

So I went into the bookstore to see what was going on. There is the presence of an "errors.h" file which contains a list of errors which must be reported.

Unfortunately, in your Adafruit_SI5351.cpp code, no error is encoded. The "errors.h" file is useless.

We first discuss the topic in the forum before coming back here to resolve the issue. (See thread: https://forums.adafruit.com/viewtopic.php?f=41&t=178571&p=869976#p869976)

Thank you in advance for your help on this subject.

Regards, Alex

caternuson commented 2 years ago

Should be taken care of with #13.