adafruit / ArduinoCore-samd

114 stars 116 forks source link

Bugs in SAMD51 Audio Library #96

Open ianm8 opened 5 years ago

ianm8 commented 5 years ago

There are a few bugs in the Audio library that prevent some of the objects working and ADC1 in the AudioInputAnalogStereo object.

The audio library is here: https://github.com/adafruit/Audio Original discussion is here: https://forums.adafruit.com/viewtopic.php?f=62&t=148013&p=739669

Further details below.

Cheers, Ian

ladyada commented 5 years ago

sweet, can you submit a PR with the fixes ?

ianm8 commented 5 years ago

There are various files that check for the definition of KINETISK. Without it the library does not produce correct code for the SAMD51. In some instances there is a check for SAMD51 as follows:

if defined(KINETISK) || defined(SAMD51)

I used a temporary fix by adding #define KINETISK to Audio.h.

ladyada commented 5 years ago

ahh i'd rather we do it right, could you try to submit a PR? i'd appreciate it a ton - especially if you can test it

ianm8 commented 5 years ago

OK, it'll take a while! :)

ladyada commented 5 years ago

ok you can also check if other people in that thread want to help!

ianm8 commented 5 years ago

I'll make a start and see how it goes.

ianm8 commented 5 years ago

OK, I've made the changes to a GitHub Desktop pull. Now how do I do a PR?

Cheers, Ian

ladyada commented 5 years ago

see https://learn.adafruit.com/an-introduction-to-collaborating-with-version-control and https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github