Skip to content

Conversation

forderud
Copy link
Contributor

@forderud forderud commented Sep 9, 2024

I'm new to Arduino development, so I'm not sure if variable are zero-initialized by default. Regardless, it's often regarded good practice to explicitly zero-initialize pointers to reduce risk of treating uninitialized pointers as valid.

Combine with moving of other member initialization from constructor in cpp-file to header.

I'm new to Arduino development, so I'm not sure if variable are zero-initialized by default. Regardless, it's often regarded good practice to explicitly zero-initialize pointers to reduce risk of treating uninitialized pointers as valid.
@abratchik
Copy link
Owner

HID.h/HID.cpp is a part of Arduino Core. If you check the original you will find that it was half-cooked. They only supported USB HID reports but not the features. You may check this PR - submitted it long ago to the Arduino team but they did not merge it for some reason.

@abratchik abratchik closed this Sep 16, 2024
@forderud
Copy link
Contributor Author

I just submitted the relevant subset of this PR to ArduinoCore-avr in arduino/ArduinoCore-avr#571. Let's wait and see how it's received.

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

Successfully merging this pull request may close these issues.

2 participants