diff options
author | Robert Moore <Robert.Moore@intel.com> | 2016-08-12 10:20:29 -0700 |
---|---|---|
committer | Robert Moore <Robert.Moore@intel.com> | 2016-08-12 10:20:29 -0700 |
commit | e2e72a351201fd58e4694418859ae2c247dafca0 (patch) | |
tree | 9f1bbf1bee4a8c08252581d822bff034a05a6426 /source/include/acutils.h | |
parent | be5808f0e642ff9963d86f362521b4af2340e2f5 (diff) | |
download | acpica-e2e72a351201fd58e4694418859ae2c247dafca0.tar.gz |
Cleanup for all string-to-integer conversions
Consolidate multiple versions of strtoul64 to one common version.
limit possible bases to either 10 or 16.
Handles both implicit and explicit conversions.
Added a 2-character ascii-to-hex function for GPEs and buffers.
Adds a new file, utsrttoul64.c
Diffstat (limited to 'source/include/acutils.h')
-rw-r--r-- | source/include/acutils.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/source/include/acutils.h b/source/include/acutils.h index 358d1c8b7..9bc3960e7 100644 --- a/source/include/acutils.h +++ b/source/include/acutils.h @@ -296,14 +296,16 @@ AcpiUtStricmp ( ACPI_STATUS AcpiUtStrtoul64 ( char *String, - UINT32 Base, - UINT32 MaxIntegerByteWidth, + UINT32 Flags, UINT64 *RetInteger); -/* Values for MaxIntegerByteWidth above */ - -#define ACPI_MAX32_BYTE_WIDTH 4 -#define ACPI_MAX64_BYTE_WIDTH 8 +/* + * Values for Flags above + * Note: LIMIT values correspond to AcpiGbl_IntegerByteWidth values (4/8) + */ +#define ACPI_STRTOUL_32BIT 0x04 /* 4 bytes */ +#define ACPI_STRTOUL_64BIT 0x08 /* 8 bytes */ +#define ACPI_STRTOUL_BASE16 0x10 /* Default: Base10/16 */ /* @@ -358,6 +360,11 @@ AcpiUtHexToAsciiChar ( UINT64 Integer, UINT32 Position); +ACPI_STATUS +AcpiUtAsciiToHexByte ( + char *TwoAsciiChars, + UINT8 *ReturnByte); + UINT8 AcpiUtAsciiCharToHex ( int HexChar); |