Hi guys I’m playing with Nucleo STM32F411RE and STM32F407VGT6 Discovery
but when i tried to now what pin is what i could not find info
but i found that for the case STM32F411 (which for me is enought)
[em]Molecules/Pin.cs at master · MoleculeDotNet/Molecules · GitHub [/em]
from there i understood and got maps of pins for Nucleo STM32F411RE
(and based on documentation i found that UserButton is PC13 and Led PA5 - D13)
but what pin are used for STM32F407 discovery (or when i can find hardware library with pins mapped like above)
or how to find info
because in most of case i need to declare pins like this sample
OutputPort LED;
LED = new OutputPort((Cpu.Pin)4, true); pin = 4 ???
but how to know which pin numbers are used for PA pins (PA1,…PA15) …etc Discovery and to create helper for this
or did is enought to declare helper like code belove
/* PORT A*/
public const Cpu.Pin pA0 = (Cpu.Pin)((0 * 16) + 0);
public const Cpu.Pin pA1 = (Cpu.Pin)((0 * 16) + 1);
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
public const Cpu.Pin pA15 = (Cpu.Pin)((0 * 16) + 15);
/* PORT B*/
public const Cpu.Pin pB0 = (Cpu.Pin)(([b]1[/b] * 16) + 0);
public const Cpu.Pin pB1 = (Cpu.Pin)(([b]1[/b]* 16) + 1);
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
public const Cpu.Pin pB15 = (Cpu.Pin)(([b]1[/b] * 16) + 15);
/* PORT C*/
public const Cpu.Pin pC0 = (Cpu.Pin)(([b]2[/b] * 16) + 0);
public const Cpu.Pin pC1 = (Cpu.Pin)(([b]2[/b]* 16) + 1);
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
public const Cpu.Pin pC15 = (Cpu.Pin)(([b]2[/b] * 16) + 15);
for example A = 0, B=1, C=2, D=3 … see bold on code
regards,
VALONI