/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2014-2020. All rights reserved. * Description: boot * Author: SmartMedia_BSP * Create: 2014-06-04 */ #ifndef COMPILEH #define COMPILEH #include #define array_size(x) (sizeof(x) / sizeof(*(x))) #define swap32(_x) ((uint32)( \ ((((uint32)(_x)) & 0x000000FF) << 24) | \ ((((uint32)(_x)) & 0x0000FF00) << 8) | \ ((((uint32)(_x)) & 0xFF000000) >> 24) | \ ((((uint32)(_x)) & 0x00FF0000) >> 8))) #define swap16(_x) ((uint16)( \ ((((uint16)(_x)) & 0xFF00) >> 8) | \ ((((uint16)(_x)) & 0x00FF) << 8))) #define around(size, align) (((size) + (align) - 1) & (~((align) - 1))) #define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #include #ifndef CONFIG_NO_STRING # define _t(x) x #else # define _t(x) 0 #endif #endif /* COMPILEH */