code: def inc_ptr(self, ptr):
          
          result = ptr + self.reading_len[self.ws_type]
          if result >= 0x10000:
              result = self.data_start
          return result
docs: Get next circular buffer data pointer.