Replace the hmc5983 cs operating function to be a macro