What does this mean?

I found this line in the default camera code, and I can’t figure out what it means:

Pwm1_red ^= 1;

it sort of looks like early pascal, in which case it would just set the variable Pwm1_red to 1, but elsewhere in the code the more traditional “=” is used.

Anyone know what this means?

–Sam
–Team 486
–Positronic Panthers

Please search this document and you should find the information you are seeking now and are likely to seek in the near future.

[quote=schenkin]I found this line in the default camera code, and I can’t figure out what it means:

Pwm1_red ^= 1;

This expands to Pwm1_red = Pwm1_red ^ 1;

^ is the xor operator, and like other operators, can be combined with = to give the shorthand statement that confused you[/quote]

Thanks everyone!