As I understand this code, it put CS to LOW for digit pot can send a signal on wiper exit accordingly with value.