PAL A Platform Abstraction Layer connects the mbed-client with the underlying platform.

- Main Page
- Data Structures
- Files

- File List
- Globals

Macros
pal_macros.h File Reference
`#include "pal_errors.h"`

Go to the source code of this file.

## Macros
#define | PAL_SUCCESS 0
#define | PAL_MAX_UINT8 0xFFU
#define | PAL_MAX_UINT16 0xFFFFU
#define | PAL_MAX_UINT32 0xFFFFFFFFUL
#define | PAL_MAX_INT32 0x7FFFFFFFL
#define | PAL_MIN_INT32 0x80000000L
#define | PAL_MAX_UINT64 0xFFFFFFFFFFFFFFFFULL
#define | PAL_MAX_INT64 0x7FFFFFFFFFFFFFFFLL
#define | PAL_MAX(a, b) ((a) > (b) ? (a) : (b))
#define | PAL_MIN(a, b) ((a) < (b) ? (a) : (b))
#define | PAL_DIVIDE_ROUND_UP(num, divider) (((num) + (divider) - 1) / (divider))
#define | LITTLE__ENDIAN 1
#define | PAL_HTONS(x)
#define | PAL_NTOHS(x)
#define | PAL_HTONL(x)
#define | PAL_NTOHL(x)
#define | PAL_INVERSE_UINT16_BYTES(val) ( ((val) << 8) | (((val) & 0x0000FF00) >> 8))
#define | PAL_INVERSE_UINT32_BYTES(val) ( ((val) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24) )
#define | PAL_INVERSE_UINT64_BYTES(val) ((PAL_INVERSE_UINT32_BYTES( ((val >> 16) >> 16)) &0xffffffff) | ((((uint64_t)PAL_INVERSE_UINT32_BYTES(val & 0xffffffff))<<16)<<16))
#define | PAL_LITTLE_ENDIAN_TO_HOST_16BIT(x) (x)
#define | PAL_LITTLE_ENDIAN_TO_HOST_32BIT(x) (x)
#define | PAL_LITTLE_ENDIAN_TO_HOST_64BIT(x) (x)
#define | PAL_HOST_TO_LITTLE_ENDIAN_16BIT(x) (x)
#define | PAL_HOST_TO_LITTLE_ENDIAN_32BIT(x) (x)
#define | PAL_HOST_TO_LITTLE_ENDIAN_64BIT(x) (x)
#define | PAL_MODULE_INIT(INIT) INIT= 1
#define | PAL_MODULE_DEINIT(INIT) INIT= 0
#define | PAL_MODULE_IS_INIT(INIT)
#define | DEBUG_PRINT(ARGS...)

## Macro Definition Documentation

#define DEBUG_PRINT | ( |  | ARGS... | ) |

#define LITTLE__ENDIAN 1

#define PAL_DIVIDE_ROUND_UP | ( |  | num,
|  |  | divider
| ) |  | (((num) + (divider) - 1) / (divider))

#define PAL_HOST_TO_LITTLE_ENDIAN_16BIT | ( |  | x | ) | (x)

#define PAL_HOST_TO_LITTLE_ENDIAN_32BIT | ( |  | x | ) | (x)

#define PAL_HOST_TO_LITTLE_ENDIAN_64BIT | ( |  | x | ) | (x)

#define PAL_HTONL | ( |  | x | ) |

Value:
((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
(((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))

#define PAL_HTONS | ( |  | x | ) |

Value:
(((((unsigned short)(x)) >> 8) & 0xff) | \
((((unsigned short)(x)) & 0xff) << 8))

#define PAL_INVERSE_UINT16_BYTES | ( |  | val | ) | ( ((val) << 8) | (((val) & 0x0000FF00) >> 8))

#define PAL_INVERSE_UINT32_BYTES | ( |  | val | ) | ( ((val) >> 24) | (((val) & 0x00FF0000) >> 8) | (((val) & 0x0000FF00) << 8) | (((val) & 0x000000FF) << 24) )

#define PAL_INVERSE_UINT64_BYTES | ( |  | val | ) | ((PAL_INVERSE_UINT32_BYTES( ((val >> 16) >> 16)) &0xffffffff) | ((((uint64_t)PAL_INVERSE_UINT32_BYTES(val & 0xffffffff))<<16)<<16))

#define PAL_LITTLE_ENDIAN_TO_HOST_16BIT | ( |  | x | ) | (x)

#define PAL_LITTLE_ENDIAN_TO_HOST_32BIT | ( |  | x | ) | (x)

#define PAL_LITTLE_ENDIAN_TO_HOST_64BIT | ( |  | x | ) | (x)

#define PAL_MAX | ( |  | a,
|  |  | b
| ) |  | ((a) > (b) ? (a) : (b))

#define PAL_MAX_INT32 0x7FFFFFFFL

#define PAL_MAX_INT64 0x7FFFFFFFFFFFFFFFLL

#define PAL_MAX_UINT16 0xFFFFU

#define PAL_MAX_UINT32 0xFFFFFFFFUL

#define PAL_MAX_UINT64 0xFFFFFFFFFFFFFFFFULL

#define PAL_MAX_UINT8 0xFFU

#define PAL_MIN | ( |  | a,
|  |  | b
| ) |  | ((a) < (b) ? (a) : (b))

#define PAL_MIN_INT32 0x80000000L

#define PAL_MODULE_DEINIT | ( |  | INIT | ) | INIT= 0

#define PAL_MODULE_INIT | ( |  | INIT | ) | INIT= 1

#define PAL_MODULE_IS_INIT | ( |  | INIT | ) |

#define PAL_NTOHL | ( |  | x | ) |

Value:
((((x)>>24) & 0xffL) | (((x)>>8) & 0xff00L) | \
(((x)<<8) & 0xff0000L) | (((x)<<24) & 0xff000000L))

#define PAL_NTOHS | ( |  | x | ) |

Value:
(((((unsigned short)(x)) >> 8) & 0xff) | \
((((unsigned short)(x)) & 0xff) << 8) )

#define PAL_SUCCESS 0