default pins for SPI, I²C, Serial #1819
-
In the wiki, for Hardwareserial it says that when creating a new serial instance, the first pin in pinmap corresponding to that serial port is chosen. additional question: If I wanted to create a custom variant in which more serials and second I²C and SPI are defined by default, where (and how) can I add those? In variant_XXX.h? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes if you only provide the peripheral instance name.
Yes, same if you specify instance name.
If they are not defined in the https://github.com/stm32duino/Arduino_Core_STM32/blob/main/cores/arduino/pins_arduino.h#L43-L84
As it is a Nucleo with an Arduino Uno connector, it uses the default. For NSS it could be any pin not only the hardware one from the peripheral as in that case it is a Software CS.
Several way exists:
|
Beta Was this translation helpful? Give feedback.
Yes if you only provide the peripheral instance name.
Yes, same if you specify instance name.
If they are not defined in the
variant_*.h
then it uses the default one which are specified here:https://github.com/stm32duino/Arduino_Core_STM32/blob/main/cores/arduino/pins_arduino.h#L43-L84