Browse Source

Change memory size report to strings

pull/158/head
Jim Parziale 2 years ago
parent
commit
0f5b312c5b
3 changed files with 12 additions and 12 deletions
  1. +1
    -1
      gpio/gpio.c
  2. +10
    -10
      wiringPi/wiringPi.c
  3. +1
    -1
      wiringPi/wiringPi.h

+ 1
- 1
gpio/gpio.c View File

@@ -1172,7 +1172,7 @@ static void doVersion (char *argv[])
" Type : %s\n"
" Processor: %s\n"
" Revision : %s\n"
" Memory : %dMB\n"
" Memory : %s\n"
" Maker : %s\n"
" %s\n",
piModelNames[model],


+ 10
- 10
wiringPi/wiringPi.c View File

@@ -275,16 +275,16 @@ const char *piProcessorNames[5] =
};

// Memory sizes in MB
const int piMemorySize[8] =
{
256, // 0
512, // 1
1024, // 2
2048, // 3
4096, // 4
8192, // 5
0, // 6
0, // 7
const char *piMemorySize[8] =
{
"256MB", // 0
"512MB", // 1
"1GB", // 2
"2GB", // 3
"4GB", // 4
"8GB", // 5
"16GB", // 6
"32GB", // 7
};

// Time for easy calculations


+ 1
- 1
wiringPi/wiringPi.h View File

@@ -142,7 +142,7 @@ extern const char *piModelNames [21];
extern const char *piRevisionNames [ 5];
extern const char *piMakerNames [16];
extern const char *piProcessorNames[ 5];
extern const int piMemorySize [ 8];
extern const char *piMemorySize [ 8];


// Intended for the GPIO program


Loading…
Cancel
Save