mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 16:00:39 +01:00
[v0.92][ARM] Print ACII art based on SoC instead of CPU vendor. Add snapdragon ASCII art. Refactor printer to save some lines of code
This commit is contained in:
@@ -16,7 +16,7 @@ static char* soc_trademark_string[] = {
|
||||
[SOC_EXYNOS] = "Exynos",
|
||||
};
|
||||
|
||||
bool match_soc(struct system_on_chip* soc, char* raw_name, char* expected_name, char* soc_name, SOC soc_vendor, int32_t process) {
|
||||
bool match_soc(struct system_on_chip* soc, char* raw_name, char* expected_name, char* soc_name, VENDOR soc_vendor, int32_t process) {
|
||||
if(strlen(raw_name) > strlen(expected_name))
|
||||
return false;
|
||||
|
||||
@@ -407,6 +407,10 @@ char* get_soc_name(struct system_on_chip* soc) {
|
||||
return soc->soc_name;
|
||||
}
|
||||
|
||||
VENDOR get_soc_vendor(struct system_on_chip* soc) {
|
||||
return soc->soc_vendor;
|
||||
}
|
||||
|
||||
char* get_str_process(struct system_on_chip* soc) {
|
||||
char* str;
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#ifndef __SOC__
|
||||
#define __SOC__
|
||||
|
||||
#include "../common/cpu.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef int32_t SOC;
|
||||
|
||||
enum {
|
||||
SOC_UNKNOWN,
|
||||
SOC_SNAPDRAGON,
|
||||
@@ -13,7 +12,7 @@ enum {
|
||||
};
|
||||
|
||||
struct system_on_chip {
|
||||
SOC soc_vendor;
|
||||
VENDOR soc_vendor;
|
||||
int32_t process;
|
||||
char* soc_name;
|
||||
char* raw_name;
|
||||
@@ -21,6 +20,7 @@ struct system_on_chip {
|
||||
|
||||
struct system_on_chip* get_soc();
|
||||
char* get_soc_name(struct system_on_chip* soc);
|
||||
VENDOR get_soc_vendor(struct system_on_chip* soc);
|
||||
char* get_str_process(struct system_on_chip* soc);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user