1 | /*␊ |
2 | * Convert.h␊ |
3 | * Declare conversion utility functions␊ |
4 | * --Rek␊ |
5 | */␊ |
6 | ␊ |
7 | #ifndef __CONVERT_H␊ |
8 | #define __CONVERT_H␊ |
9 | ␊ |
10 | //#include "libsaio.h"␊ |
11 | #include "libsa.h"␊ |
12 | #include "saio_internal.h" // "external" to verbose function␊ |
13 | //---␊ |
14 | #include "efi.h"␊ |
15 | ␊ |
16 | #define UUID_LEN␉16␊ |
17 | ␊ |
18 | const char * getStringFromUUID(const EFI_CHAR8* uuid);␊ |
19 | EFI_CHAR8* getUUIDFromString(const char *source);␊ |
20 | void *convertHexStr2Binary(const char *hexStr, int *outLength);␊ |
21 | uint32_t ascii_hex_to_int(char *buff);␊ |
22 | ␊ |
23 | static inline uint16_t dp_swap16(uint16_t toswap)␊ |
24 | {␊ |
25 | return (((toswap & 0x00FF) << 8) | ((toswap & 0xFF00) >> 8));␊ |
26 | }␊ |
27 | ␊ |
28 | static inline uint32_t dp_swap32(uint32_t toswap)␊ |
29 | {␊ |
30 | return ((toswap & 0x000000FF) << 24) |␊ |
31 | ((toswap & 0x0000FF00) << 8 ) |␊ |
32 | ((toswap & 0x00FF0000) >> 8 ) |␊ |
33 | ((toswap & 0xFF000000) >> 24);␊ |
34 | }␉␊ |
35 | ␊ |
36 | ␊ |
37 | #endif␊ |
38 | |