Device read/write functions implementation.