/* Reads the PS measurement data from the Si1147.  */
static void readPSData(HANDLE si114x_handle, Si114x_Sample_TypeDef *sample)
/* Reads the PS measurement data from the Si1147.  */
static void readPSData(HANDLE si114x_handle, Si114x_Sample_TypeDef *sample)
{
  sample->ps1  = Si114xReadFromRegister(si114x_handle, REG_PS1_DATA0);
  sample->ps1 |= Si114xReadFromRegister(si114x_handle, REG_PS1_DATA1) << 8;
  sample->ps2  = Si114xReadFromRegister(si114x_handle, REG_PS2_DATA0);
  sample->ps2 |= Si114xReadFromRegister(si114x_handle, REG_PS2_DATA1) << 8;
  sample->ps3  = Si114xReadFromRegister(si114x_handle, REG_PS3_DATA0);
  sample->ps3 |= Si114xReadFromRegister(si114x_handle, REG_PS3_DATA1) << 8;
}