This paper focuses on the design of both periodic time-and event-triggered control laws of switched affine systems using a hybrid dynamical system approach. The novelties of this paper rely on the hybrid dynamical representation of this class of systems and on a free-matrix min-projection control, which relaxes the structure of the usual Lyapunov matrix-based min-projection control. This contribution also presents an extension of the usual periodic time-triggered case to the event-triggered one, where the control updates are permitted only when a particular event is detected. Together with the definition of an appropriate optimization problem, a stabilization result is formulated to ensure the uniform global asymptotic stability of an attractor for both types of controllers, which is a neighborhood of the desired equilibrium. Finally, the proposed method is evaluated through a numerical example.