Additional sleep methods with array of pins as parameters ?
-
@yveaux said in Additional sleep methods with array of pins as parameters ?:
Yes, they have to set it to input. There's no pin configuration in the (AVR) sleep code: https://github.com/mysensors/MySensors/blob/development/hal/architecture/AVR/MyHwAVR.cpp#L153
But atmega pins default as inputs so it's not really mandatory with the default IC.
@nca78 said in Additional sleep methods with array of pins as parameters ?:
@yveaux said in Additional sleep methods with array of pins as parameters ?:
Yes, they have to set it to input. There's no pin configuration in the (AVR) sleep code: https://github.com/mysensors/MySensors/blob/development/hal/architecture/AVR/MyHwAVR.cpp#L153
But atmega pins default as inputs so it's not really mandatory with the default IC.
I like to make things explicit, especially if you decide to port to another architecture later on
-
@nca78 said in Additional sleep methods with array of pins as parameters ?:
@yveaux said in Additional sleep methods with array of pins as parameters ?:
Yes, they have to set it to input. There's no pin configuration in the (AVR) sleep code: https://github.com/mysensors/MySensors/blob/development/hal/architecture/AVR/MyHwAVR.cpp#L153
But atmega pins default as inputs so it's not really mandatory with the default IC.
I like to make things explicit, especially if you decide to port to another architecture later on
@yveaux said in Additional sleep methods with array of pins as parameters ?:
I like to make things explicit, especially if you decide to port to another architecture layer on
I completely agree with you. Just stating that @mfalkvidd is not wrong when saying at the moment it's not necessary to declare pins as inputs
To go back to the main subject should I make a first version of this code (in post 9) to have a clearer basis for future discussions ? Or am I going a wrong way ?
-
Anything is always better than nothing.
-
@mfalkvidd said in Additional sleep methods with array of pins as parameters ?:
I don’t think sketch developer should need to worry about setting the pin to input,
Yes, they have to set it to input. There's no pin configuration in the (AVR) sleep code: https://github.com/mysensors/MySensors/blob/development/hal/architecture/AVR/MyHwAVR.cpp#L153