I am trying to write native C++ code, used interop, to do something with a pin.
I am very familiar with STM32's internal peripherals, and I need to map Cpu.Pin to a GPIOx port address so I can manipulate the pin directly
I have downloaded and extracted everything, .net mf source code, porting kit, netduino sdk, netduino sdk source, netduino plus firmware, netduino plus firmware source, everything.
I can't find any files that reference STM32 internal peripheral registers at all. But I did find NetduinoPlusHardwareProvider, which had some code like
internal const Cpu.Pin GPIO_PIN_A_18 = (Cpu.Pin)18; // PA18/SPI0_SPCKpublic const Cpu.Pin GPIO_PIN_D13 = GPIO_PIN_A_18; // PA18/SPI0_SPCKinternal const Cpu.Pin GPIO_PIN_B_30 = (Cpu.Pin)62; // PB30/PCK2/PWM3/AD3public const Cpu.Pin GPIO_PIN_A3 = GPIO_PIN_B_30; // PB30/PCK2/PWM3/AD3
Does the Cpu.Pin numbers map to this formula?
(letter_in_alphabet_of_port - 1) * 32 + bit_number
Where for example, GPIO_PIN_D13 maps to GPIO_PIN_A_18, which means Cpu.Pin is
(1 - 1) * 32 + 18 = 18
and GPIO_PIN_B_30 is
(2 - 1) * 32 + 30 = 62
Am I right? From this, I might be able to calculate the addresses of the registers I need to manipulate, right?
Where is native interop support anyways? You talked about it in 2011 and mentioned it should be supported in firmware v4.2 but I haven't heard about it since...