Renamed "lcd_type" field of hardare info struct to "hw_version"

pull/140/head
Silvano Seva 2023-06-14 21:30:52 +02:00
rodzic 4ee4cb656d
commit 1afd868d64
12 zmienionych plików z 18 dodań i 16 usunięć

Wyświetl plik

@ -56,7 +56,13 @@ typedef enum
*/
typedef struct
{
char name[10]; /* Manufacturer-assigned hardware name. */
char name[10]; /* Manufacturer-assigned hardware name. */
uint8_t hw_version; /* Hardware version number */
uint8_t _unused : 6,
uhf_band : 1, /* Device allows UHF band operation. */
vhf_band : 1; /* Device allows VHF band operation. */
uint16_t uhf_maxFreq; /* Upper bound for UHF band, in MHz. */
uint16_t uhf_minFreq; /* Lower bound for UHF band, in MHz. */
@ -64,10 +70,6 @@ typedef struct
uint16_t vhf_maxFreq; /* Upper bound for VHF band, in MHz. */
uint16_t vhf_minFreq; /* Lower bound for VHF band, in MHz. */
uint8_t _unused : 4,
uhf_band : 1, /* Device allows UHF band operation. */
vhf_band : 1, /* Device allows VHF band operation. */
lcd_type : 2; /* LCD display type, meaningful only on MDx targets.*/
} hwInfo_t;

Wyświetl plik

@ -195,7 +195,7 @@ const char *info_items[] =
"Band",
"VHF",
"UHF",
"LCD Type"
"Hw Version"
};
const char *authors[] =

Wyświetl plik

@ -444,7 +444,7 @@ int _ui_getInfoValueName(char *buf, uint8_t max_len, uint8_t index)
snprintf(buf, max_len, "%d - %d", hwinfo->uhf_minFreq, hwinfo->uhf_maxFreq);
break;
case 8: // LCD Type
snprintf(buf, max_len, "%d", hwinfo->lcd_type);
snprintf(buf, max_len, "%d", hwinfo->hw_version);
break;
}
return 0;

Wyświetl plik

@ -130,7 +130,7 @@ const char *info_items[] =
"Band",
"VHF",
"UHF",
"LCD Type"
"Hw Version"
};
const char *authors[] =

Wyświetl plik

@ -309,7 +309,7 @@ int _ui_getInfoValueName(char *buf, uint8_t max_len, uint8_t index)
snprintf(buf, max_len, "N/A");
break;
case 8: // LCD Type
snprintf(buf, max_len, "%d", hwinfo->lcd_type);
snprintf(buf, max_len, "%d", hwinfo->hw_version);
break;
}
return 0;

Wyświetl plik

@ -138,7 +138,7 @@ void nvm_readHwInfo(hwInfo_t *info)
info->uhf_band = 1;
}
info->lcd_type = lcdInfo & 0x03;
info->hw_version = lcdInfo & 0x03;
}
/**

Wyświetl plik

@ -139,7 +139,7 @@ void nvm_readHwInfo(hwInfo_t *info)
info->uhf_maxFreq = ((uint16_t) bcd2bin(uhf_freqMax))/10;
info->vhf_band = 1;
info->uhf_band = 1;
info->lcd_type = lcdInfo & 0x03;
info->hw_version = lcdInfo & 0x03;
}
/**

Wyświetl plik

@ -232,7 +232,7 @@ void display_init()
* Since we do not have the datasheet for the controller employed in this
* screen, we can only do copy-and-paste...
*/
uint8_t lcd_type = platform_getHwInfo()->lcd_type;
uint8_t lcd_type = platform_getHwInfo()->hw_version;
if((lcd_type == 2) || (lcd_type == 3))
{

Wyświetl plik

@ -77,7 +77,7 @@ void platform_init()
hwInfo.uhf_maxFreq = 470;
hwInfo.uhf_minFreq = 400;
hwInfo.uhf_band = 1;
hwInfo.lcd_type = 0;
hwInfo.hw_version = 0;
memcpy(hwInfo.name, "DM-1801", 7);
hwInfo.name[7] = '\0';
}

Wyświetl plik

@ -76,7 +76,7 @@ void platform_init()
hwInfo.uhf_maxFreq = 470;
hwInfo.uhf_minFreq = 400;
hwInfo.uhf_band = 1;
hwInfo.lcd_type = 0;
hwInfo.hw_version = 0;
memcpy(hwInfo.name, "GD-77", 5);
hwInfo.name[5] = '\0';
}

Wyświetl plik

@ -70,7 +70,7 @@ void platform_init()
hwInfo.uhf_maxFreq = 480;
hwInfo.uhf_minFreq = 400;
hwInfo.uhf_band = 1;
hwInfo.lcd_type = 0;
hwInfo.hw_version = 0;
memcpy(hwInfo.name, "MD-9600", 7);
hwInfo.name[8] = '\0';

Wyświetl plik

@ -37,7 +37,7 @@ int main()
info->uhf_band ? "yes" : "no");
printf("- VHF band range: %d - %d MHz\r\n", info->vhf_minFreq, info->vhf_maxFreq);
printf("- UHF band range: %d - %d MHz\r\n", info->uhf_minFreq, info->uhf_maxFreq);
printf("- Display type: %d\r\n\r\n", info->lcd_type);
printf("- Display type: %d\r\n\r\n", info->hw_version);
}
return 0;