mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-25 07:50:40 +01:00
[v1.03][RISCV] Add SiFive ascii art
This commit is contained in:
@@ -266,6 +266,27 @@ $C1 ## ### ## ##. ## ### ### \
|
|||||||
$C1 ## ### ## ##########. ########## ### \
|
$C1 ## ### ## ##########. ########## ### \
|
||||||
$C1 "
|
$C1 "
|
||||||
|
|
||||||
|
#define ASCII_SIFIVE \
|
||||||
|
"$C1 ########################### \
|
||||||
|
$C1 ############################### \
|
||||||
|
$C1 #### #### \
|
||||||
|
$C1 ##### ##### \
|
||||||
|
$C1 ##### ##### \
|
||||||
|
$C1 #### ######################### \
|
||||||
|
$C1 #### ########################### \
|
||||||
|
$C1 #### #### \
|
||||||
|
$C1 ##### ##### \
|
||||||
|
$C1 ##### ##### \
|
||||||
|
$C1 ################################# #### \
|
||||||
|
$C1 ############################## ##### \
|
||||||
|
$C1 ###### ####### ####### \
|
||||||
|
$C1 ###### # ###### \
|
||||||
|
$C1 ###### ###### \
|
||||||
|
$C1 ###### ###### \
|
||||||
|
$C1 ###### ###### \
|
||||||
|
$C1 ########### \
|
||||||
|
$C1 ### "
|
||||||
|
|
||||||
// --------------------- LONG LOGOS ------------------------- //
|
// --------------------- LONG LOGOS ------------------------- //
|
||||||
#define ASCII_AMD_L \
|
#define ASCII_AMD_L \
|
||||||
"$C1 \
|
"$C1 \
|
||||||
@@ -369,6 +390,7 @@ asciiL logo_apple = { ASCII_APPLE, 32, 17, false, {C_FG_WHITE},
|
|||||||
asciiL logo_allwinner = { ASCII_ALLWINNER, 47, 16, false, {C_FG_CYAN}, {C_FG_B_BLACK, C_FG_B_CYAN } };
|
asciiL logo_allwinner = { ASCII_ALLWINNER, 47, 16, false, {C_FG_CYAN}, {C_FG_B_BLACK, C_FG_B_CYAN } };
|
||||||
asciiL logo_rockchip = { ASCII_ROCKCHIP, 58, 8, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} };
|
asciiL logo_rockchip = { ASCII_ROCKCHIP, 58, 8, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} };
|
||||||
asciiL logo_riscv = { ASCII_RISCV, 63, 18, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} };
|
asciiL logo_riscv = { ASCII_RISCV, 63, 18, false, {C_FG_CYAN, C_FG_YELLOW}, {C_FG_CYAN, C_FG_YELLOW} };
|
||||||
|
asciiL logo_sifive = { ASCII_SIFIVE, 51, 19, false, {C_FG_WHITE}, {C_FG_WHITE, C_FG_B_CYAN} };
|
||||||
|
|
||||||
// Long variants | ----------------------------------------------------------------------------------------------------|
|
// Long variants | ----------------------------------------------------------------------------------------------------|
|
||||||
asciiL logo_amd_l = { ASCII_AMD_L, 62, 19, true, {C_BG_WHITE, C_BG_GREEN}, {C_FG_WHITE, C_FG_GREEN} };
|
asciiL logo_amd_l = { ASCII_AMD_L, 62, 19, true, {C_BG_WHITE, C_BG_GREEN}, {C_FG_WHITE, C_FG_GREEN} };
|
||||||
|
|||||||
@@ -369,7 +369,10 @@ void choose_ascii_art(struct ascii* art, struct color** cs, struct terminal* ter
|
|||||||
art->art = choose_ascii_art_aux(&logo_arm_l, &logo_arm, term, lf);
|
art->art = choose_ascii_art_aux(&logo_arm_l, &logo_arm, term, lf);
|
||||||
}
|
}
|
||||||
#elif ARCH_RISCV
|
#elif ARCH_RISCV
|
||||||
art->art = &logo_riscv;
|
if(art->vendor == SOC_VENDOR_SIFIVE)
|
||||||
|
art->art = &logo_sifive;
|
||||||
|
else
|
||||||
|
art->art = &logo_riscv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// 2. Choose colors
|
// 2. Choose colors
|
||||||
@@ -919,7 +922,7 @@ bool print_cpufetch_arm(struct cpuInfo* cpu, STYLE s, struct color** cs, struct
|
|||||||
|
|
||||||
#ifdef ARCH_RISCV
|
#ifdef ARCH_RISCV
|
||||||
bool print_cpufetch_riscv(struct cpuInfo* cpu, STYLE s, struct color** cs, struct terminal* term) {
|
bool print_cpufetch_riscv(struct cpuInfo* cpu, STYLE s, struct color** cs, struct terminal* term) {
|
||||||
struct ascii* art = set_ascii(get_cpu_vendor(cpu), s);
|
struct ascii* art = set_ascii(get_soc_vendor(cpu->soc), s);
|
||||||
if(art == NULL)
|
if(art == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ struct cpuInfo* get_cpu_info(void) {
|
|||||||
cpu->hv->present = false;
|
cpu->hv->present = false;
|
||||||
cpu->soc = get_soc();
|
cpu->soc = get_soc();
|
||||||
cpu->freq = get_frequency_info(0);
|
cpu->freq = get_frequency_info(0);
|
||||||
cpu->cpu_vendor = CPU_VENDOR_RISCV;
|
|
||||||
cpu->peak_performance = get_peak_performance(cpu);
|
cpu->peak_performance = get_peak_performance(cpu);
|
||||||
|
|
||||||
return cpu;
|
return cpu;
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
VENDOR get_soc_vendor(struct system_on_chip* soc) {
|
||||||
|
return soc->soc_vendor;
|
||||||
|
}
|
||||||
|
|
||||||
char* get_str_process(struct system_on_chip* soc) {
|
char* get_str_process(struct system_on_chip* soc) {
|
||||||
char* str;
|
char* str;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ struct system_on_chip {
|
|||||||
|
|
||||||
struct system_on_chip* get_soc(void);
|
struct system_on_chip* get_soc(void);
|
||||||
char* get_soc_name(struct system_on_chip* soc);
|
char* get_soc_name(struct system_on_chip* soc);
|
||||||
//VENDOR get_soc_vendor(struct system_on_chip* soc);
|
VENDOR get_soc_vendor(struct system_on_chip* soc);
|
||||||
char* get_str_process(struct system_on_chip* soc);
|
char* get_str_process(struct system_on_chip* soc);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user