59#define _PROTECTED_WRITE(reg, value)
77#define _PROTECTED_WRITE_SPM(reg, value)
81#define _PROTECTED_WRITE(reg, value) \
82 __asm__ __volatile__("out %[ccp], %[ccp_ioreg]" "\n\t" \
83 "sts %[ioreg], %[val]" \
85 : [ccp] "I" (_SFR_IO_ADDR(CCP)), \
86 [ccp_ioreg] "d" ((uint8_t)CCP_IOREG_gc), \
87 [ioreg] "n" (_SFR_MEM_ADDR(reg)), \
88 [val] "r" ((uint8_t)value))
90#define _PROTECTED_WRITE_SPM(reg, value) \
91 __asm__ __volatile__("out %[ccp], %[ccp_spm_mask]" "\n\t" \
92 "sts %[ioreg], %[val]" \
94 : [ccp] "I" (_SFR_IO_ADDR(CCP)), \
95 [ccp_spm_mask] "d" ((uint8_t)CCP_SPM_gc), \
96 [ioreg] "n" (_SFR_MEM_ADDR(reg)), \
97 [val] "r" ((uint8_t)value))