Main Site Documentation

EMX Pin Number Mapping


#1

Hi,

Given an IO number (E.g: EMX.Pin.IO29), how can this be mapped to the port / pin number ? (I.e: P4.22)

This is so that I can specify a pin in my C# code, pass this number through to an RLP function as a byte and then work out which register / bit to change.

Using RLPext->GPIO.WritePin() is not an option for me as it’s far too slow.

Thanks.


#2

You can build a map table from the datasheet.


#3

So there’s no built-in “cross platform” method for doing this and I’ll have to have a version for each device ? (EMX, Hydra, etc.)

Edit: Then again, directly writing to the registers isn’t going to be “cross platform” so it doesn’t matter in the long run !

Large lookup table it is then, thank you.