Library i/o type

Hi,
I'm using Max31865 and Mega and would like to have the MAX31865_2WIRE, MAX31865_3WIRE and
MAX31865_4WIRE a variable in arduino sketch. This is to read jumper pins and then start the max with
the jumper vales.
program staement: max.begin(MAX31865_4WIRE);
would like to use variable
JMP_WIRE : max.begin(JMP_WIRE);

How to define JMP_WIRE in arduino code?

I'm using Adafruit MAX31865 and in the Header file MAX31865_4WIRE is
typedef enum max31865_numwires {
MAX31865_2WIRE = 0,
MAX31865_3WIRE = 1,
MAX31865_4WIRE = 0
} max31865_numwires_t;

I tried a few things in failure, need better understanding of C

How can I use a variable name in arduino to represent MAX31865_[4,3,2]WIRE ?
Thanks,
Keith

Define the variable as:

max31865_numwires_t num_wires = MAX31865_2WIRE;

Then you can call the begin method this way:

max.begin(num_wires);

OK, thanks. Will try it. I'm confused though what is the variable type num_wires ?
Also how does arduino know that I'm referencing max with:
max31865_numwires_t num_wires = MAX31865_2WIRE;

do I need to use max.max31865_numwires_t num_wires = MAX31865_2WIRE;

the max is instantiated: Adafruit_MAX31865 max = Adafruit_MAX31865(53, 51, 50, 52);

Thanks for the quick answer and your patience,
Keith

typedef enum max31865_numwires {
MAX31865_2WIRE = 0,
MAX31865_3WIRE = 1,
MAX31865_4WIRE = 0
} max31865_numwires_t;

This defines a type max31865_numwires_t. The _t at the end is a clue to tell you that it's a type. (The compiler doesn't care.)

So just the same as int i; creates an integer called i, max31865_numwires_t z creates a numwires called z.

You don't put max. in front of it as this is defined outside of the class.

Tell us what you are REALLY trying to do. Those values affect how the code is compiled as well as the run-time behavior. You can't change them at run time.