How are INPUT, OUTPUT, and INPUT_PULLUP defined?

I'm trying to send pinMode() parameters via serial using 6 bits for the pin and 2 bits for the mode. So my two-byte signal looks like this:

C-ppppppmm

Where C is the command byte, and the 6 p's are 6 bits representing the desired pin, with the two 'm' bits being the mode.

here's how my code looks for this particular command:

            case DIGITAL_MODE:
  				while(Serial.available() < 1){}
				instructionByte = Serial.read();
				switch(instructionByte & B00000011)
				{
					case O;
						pinMode( ((instructionByte >> 2) & B00111111) , OUTPUT);
						break;
					case 1;
						pinMode( ((instructionByte >> 2) & B00111111) , INPUT);
						break;
					case 2;
						pinMode( ((instructionByte >> 2) & B00111111) , INPUT_PULLUP);
						break;						
				}
				break;

As you can see, I'm currently using the values 0, 1, and 2. But I figure for the sake consistency, I would like to use INPUT, OUTPUT, and INPUT_PULLUP, as my cases, and then define A_INPUT, A_OUTPUT, and A_INPUT_PULLUP the exact same way.

But also, I'm just curious as well. How are INPUT, OUTPUT, and INPUT_PULLUP defined? Like if I looked at #define INPUT, what value would I see?

Use the Arduino to tell you the answer.

void setup() 
{
  Serial.begin(115200);
  Serial.print("INPUT : ");
  Serial.println(INPUT);
  Serial.print("OUTPUT : ");
  Serial.println(OUTPUT);
  Serial.print("INPUT_PULLUP : ");
  Serial.println(INPUT_PULLUP);
}

void loop() 
{
}

haha, I suppose that makes as much sense as anything. I didn't think about that because I'm currently at work, but I'll have to do this when I get home. I'll try to remember to post the results here for others who are interested.

Found it in Arduino.h

#define INPUT 0x0
#define OUTPUT 0x1
#define INPUT_PULLUP 0x2

Jonathanese:
Found it in Arduino.h

You could also work it out from the Atmega 328 datasheet.

...R