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

Adding maxspeed to shiftIn and shiftOut #159

Closed
wants to merge 1 commit into from
Closed

Conversation

lemio
Copy link

@lemio lemio commented Dec 1, 2021

Allowing the user to set the max speed will enable newer faster Arduino based MCU's to control older devices that need slower clock speeds to function.

#83

Allowing the user to set the max speed will enable newer faster Arduino based MCU's to control older devices that need slower clock speeds to function. 

arduino#83
@facchinm
Copy link
Member

facchinm commented Dec 2, 2021

Hi @lemio ,
as pointed out by the CI unit test failure, Common.h functions have C "namespace" (see the extern "C" on the top of the file), so function overloading is not available.
Finding another way that doesn't break backwards compatibility while keeping the API is not super easy but I'm pretty sure it can be done 😉

@aentinger
Copy link
Contributor

Closing this, since nothing has been happening for a long time.

@aentinger aentinger closed this Sep 13, 2023
@amotl
Copy link

amotl commented Sep 13, 2023

Dear Alexander,

first of all, I would like to thank @lemio for his work in this area. It was fundamental for the patch we submitted to the canonical HX711 repository the other day, to work around this issue.

Please find references below why the community is dearly needing this improvement. Clock speeds will probably not stop to increase, so I am wondering how the Arduino HAL will approach that problem with respect to this important detail.

I see what @facchinm is referring to here, and it might be a valid point why this patch can not be integrated, for example because of backward compatibility issues. This is why I am writing to you, because I think, or would like to see, that a bit more attention is given to this patch, or any reasoning why it is rejected. Thank you already for taking the time.

With kind regards,
Andreas.

References

@amotl

This comment was marked as off-topic.

@amotl

This comment was marked as off-topic.

@lemio
Copy link
Author

lemio commented Sep 13, 2023

Could it be done in the same way as https://www.arduino.cc/reference/en/language/functions/advanced-io/pulsein/ where the last argument is optional? In this way it might be possible without function overloading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants