Stability of sampled-data piecewise affine systems: A time-delay approach