/* Reads data from the serial port in a blocking manner.  */
bool SerialPortRead(uint8_t *data, uint32_t length)
/* Reads data from the serial port in a blocking manner.  */
bool SerialPortRead(uint8_t *data, uint32_t length)
{
  bool result = false;
  assert(data != NULL);
  assert(length > 0);
  if ( (data != NULL) && (length > 0) )
  {
    if ((uint32_t)read(portHandle, data, length) == length)
    {
      result = true;
    }
  }
  return result;
}