Page 1 of 1

PK70 GPIO

Posted: Tue Aug 28, 2018 6:48 pm
by mike
For the MOD5441x, Netburner provides a function to control GPIO lines.
For example J1[6] = 0, sets that line as an output and drives it low.

Is there an equivalent function for the PK70 ??
If so, what is the syntax and what is the include file ??

I tried this line to set that pin to GPIO:
J1[6].function(PIN6_GPIO);
The compile error is: "J1" was not declared in this scope"

The constant "PIN6_GPIO" is defined in "\pk70\include\pinconstant.h"

Thanks, Mike.

Re: PK70 GPIO

Posted: Tue Aug 28, 2018 7:03 pm
by mlara
Hi Mike,

You're looking for the "Pins" array instead of the "J1" and "J2" arrays. This is defined in \nburn\include\pins.h. There is some example usage in the comments above the class definition, too. Note the platform #ifdef for the PinIO class definition in pins.h.

You're code might look like the following for the PK70:
Pins[6].function(PIN6_GPIO);

Re: PK70 GPIO

Posted: Tue Aug 28, 2018 7:18 pm
by mike
mlara,

Great. Thank you. That should help a lot.
I did notice the '#ifdef' for the various platforms, but I missed the '#else' - where Pins is defined.