API register write logic added.