Hi Adam,
Looking at your source code, it seems that you are not using the correct I2C slave address. Considering SA0 = 1, the 7-bit slave address is 0x1D, which translates to 0x3A for a write and 0x3B for a read:
To read e.g. the WHO_AM_I register (0x0D) you have to:
1. Send a start sequence
2. Send 0x3A // MMA8452Q slave address with the R/W bit low or 0x1D<<1
3. Send 0x0D
4. Send a start sequence again (repeated start)
5. Send 0x3B // MMA8452Q slave address with the R/W bit high or (0x1D<<1)|0x01
6. Read the data byte from the WHO_AM_I register
7. Send NAK and a stop sequence.
Below is the image from a logic analyzer illustrating it (note that it is for the MMA8652FC I have on my desk).

And here is a single byte write operation which writes the value 0x3D to the CTRL_REG1 register 0x2A.

I hope it helps.
Regards,
Tomas
PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.