3 Answers
3

TCON2 is a timer register on PIC MCUs, where the last two bits configure the prescaler.

T2CKPS[1:0] = 0b00 = 0 => /1 prescaler

T2CKPS[1:0] = 0b01 = 1 => /4 prescaler

T2CKPS[1:0] = 0b1x = 2 or 3 => /16 prescaler

Bit 2 actually switches the timer on, so it always needs to be set to do anything, hence the 1 << 2 (which really should be written as 1 << T2CON_TMR2ON_bit with T2CON_TMR2ON_bit being defined in some CPU-configuration header)

All said and done, the three settings are 0b100, 0b101, and 0b110, which turn on the timer, and tweak the prescaler to get those frequencies mentioned in the comments.

Also, using an enum with one element is just about pointless; use #define.