2.1.1 _PROTECTED_WRITE

_PROTECTED_WRITE(reg, value)

Write value value to IO register reg that is protected through the Xmega configuration change protection (CCP) mechanism. This implements the timed sequence that is required for CCP.

Example to modify the CPU clock:
 #include <avr/io.h>

 _PROTECTED_WRITE(CLK_PSCTRL, CLK_PSADIV0_bm);
 _PROTECTED_WRITE(CLK_CTRL, CLK_SCLKSEL0_bm);