setCPUarchitecture function

void setCPUarchitecture(
  1. CpuArchitecture arch
)

Bypasses the autodetection of the CPU architecture.

Implementation

void setCPUarchitecture(CpuArchitecture arch) {
  if (arch == CpuArchitecture.notSupported ||
      arch == CpuArchitecture.undefined) {
    throw LibraryException(
        LibraryErrorCode.invalidParameter, "Invalid parameter");
  }
  var cpu = arch.toString();
  cpu = cpu.substring(cpu.indexOf(".") + 1).toLowerCase();
  library = 'libperiphery_$cpu.so';
}