PK70 GPIO

Discussion to talk about software related topics only.
Post Reply
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

PK70 GPIO

Post 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.
User avatar
mlara
Posts: 8
Joined: Tue Mar 29, 2016 10:40 am

Re: PK70 GPIO

Post 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);
Mike Lara
Project Engineer
Netburner, Inc
User avatar
mike
Posts: 20
Joined: Thu Oct 29, 2015 10:25 am

Re: PK70 GPIO

Post 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.
Post Reply