Skip to content

Commit

Permalink
Merge pull request #1 from p-x9/feature/support-m4
Browse files Browse the repository at this point in the history
  • Loading branch information
p-x9 authored Sep 7, 2024
2 parents 99709a8 + cfda082 commit 1716ffc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/CPUInfo/Model/CPUFamily.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ public enum CPUFamily {
case arm_coll
/// CPUFAMILY_ARM_LOBOS
case arm_lobos
/// CPUFAMILY_ARM_DONAN
case arm_donan
}

extension CPUFamily: RawRepresentable {
Expand Down Expand Up @@ -132,6 +134,7 @@ extension CPUFamily: RawRepresentable {
case RawValue(CPUFAMILY_ARM_PALMA): self = .arm_palma
case RawValue(CPUFAMILY_ARM_COLL): self = .arm_coll
case RawValue(CPUFAMILY_ARM_LOBOS): self = .arm_lobos
case RawValue(CPUFAMILY_ARM_DONAN): self = .arm_donan
default: return nil
}
}
Expand Down Expand Up @@ -175,6 +178,7 @@ extension CPUFamily: RawRepresentable {
case .arm_palma: RawValue(CPUFAMILY_ARM_PALMA)
case .arm_coll: RawValue(CPUFAMILY_ARM_COLL)
case .arm_lobos: RawValue(CPUFAMILY_ARM_LOBOS)
case .arm_donan: RawValue(CPUFAMILY_ARM_DONAN)
}
}
}
Expand Down Expand Up @@ -220,6 +224,7 @@ extension CPUFamily: CustomStringConvertible {
case .arm_palma: "CPUFAMILY_ARM_PALMA"
case .arm_coll: "CPUFAMILY_ARM_COLL"
case .arm_lobos: "CPUFAMILY_ARM_LOBOS"
case .arm_donan: "CPUFAMILY_ARM_DONAN"
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions Sources/CPUInfoC/include/cpu_family.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@
#define CPUFAMILY_ARM_LOBOS 0x5f4dea93
#endif

#ifndef CPUFAMILY_ARM_DONAN
#define CPUFAMILY_ARM_DONAN 0x6f5129ac
#endif

#endif /* cpu_family_h */

0 comments on commit 1716ffc

Please sign in to comment.