Chameleon

Chameleon Svn Source Tree

Root/branches/azimutz/Chazi/i386/libsaio/convert.h

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"
13#include "efi.h"
14
15#define UUID_LEN16
16
17const char * getStringFromUUID(const EFI_CHAR8* uuid);
18EFI_CHAR8* getUUIDFromString(const char *source);
19void *convertHexStr2Binary(const char *hexStr, int *outLength);
20uint32_t ascii_hex_to_int(char *buff);
21
22static inline uint16_t dp_swap16(uint16_t toswap)
23{
24 return (((toswap & 0x00FF) << 8) | ((toswap & 0xFF00) >> 8));
25}
26
27static inline uint32_t dp_swap32(uint32_t toswap)
28{
29 return ((toswap & 0x000000FF) << 24) |
30 ((toswap & 0x0000FF00) << 8 ) |
31 ((toswap & 0x00FF0000) >> 8 ) |
32 ((toswap & 0xFF000000) >> 24);
33}
34
35
36#endif
37

Archive Download this file

Revision: 816