How to Implement the "W1C" Access type using Callbacks [With Addition Changes]?

Hello Folks,

Think we have both the previous value and the current value which needs to be written. So I tried it as

value = previous & (~value);

.

Correct me if my understanding is wrong. Appreciate your help.

Regards,
Desperado