Hello,
in CW V10.4 there is example for Freedom board with MMA8451Q. It think it would be possible to reuse it. For details please see:
{CodeWarrior}\MCU\CodeWarrior_Examples\Processor_Expert\Kinetis\FRDM-KL25Z\I2C_RGB\
best regards
Vojtech Filip
Processor Expert Support Team