mirror of
https://github.com/hholtmann/smcFanControl.git
synced 2025-11-04 19:49:16 +01:00
add support for SI8 signed integer type
This commit is contained in:
@ -92,6 +92,11 @@ void printSP78(SMCVal_t val)
|
|||||||
printf("%u.%02u ", *val.bytes, (*(val.bytes+1)) * 100 / 256);
|
printf("%u.%02u ", *val.bytes, (*(val.bytes+1)) * 100 / 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void printSI8(SMCVal_t val)
|
||||||
|
{
|
||||||
|
printf("%d ", (signed char)*val.bytes);
|
||||||
|
}
|
||||||
|
|
||||||
void printBytesHex(SMCVal_t val)
|
void printBytesHex(SMCVal_t val)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -115,6 +120,8 @@ void printVal(SMCVal_t val)
|
|||||||
printFPE2(val);
|
printFPE2(val);
|
||||||
else if (strcmp(val.dataType, DATATYPE_SP78) == 0 && val.dataSize == 2)
|
else if (strcmp(val.dataType, DATATYPE_SP78) == 0 && val.dataSize == 2)
|
||||||
printSP78(val);
|
printSP78(val);
|
||||||
|
else if (strcmp(val.dataType, DATATYPE_SI8) == 0 && val.dataSize == 1)
|
||||||
|
printSI8(val);
|
||||||
|
|
||||||
printBytesHex(val);
|
printBytesHex(val);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,6 +43,7 @@
|
|||||||
#define DATATYPE_UINT16 "ui16"
|
#define DATATYPE_UINT16 "ui16"
|
||||||
#define DATATYPE_UINT32 "ui32"
|
#define DATATYPE_UINT32 "ui32"
|
||||||
#define DATATYPE_SP78 "sp78"
|
#define DATATYPE_SP78 "sp78"
|
||||||
|
#define DATATYPE_SI8 "si8 "
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char major;
|
char major;
|
||||||
|
|||||||
Reference in New Issue
Block a user