31#ifndef __ARM_2D_TYPES_H__
32#define __ARM_2D_TYPES_H__
40#include "arm_2d_features.h"
41#include "arm_2d_utils.h"
42#include "__arm_2d_math.h"
49# pragma clang diagnostic push
50# pragma clang diagnostic ignored "-Wunknown-warning-option"
51# pragma clang diagnostic ignored "-Wreserved-identifier"
52# pragma clang diagnostic ignored "-Wmissing-declarations"
53# pragma clang diagnostic ignored "-Wpadded"
54# pragma clang diagnostic ignored "-Wc11-extensions"
55#elif __IS_COMPILER_ARM_COMPILER_5__
56# pragma diag_suppress 64
57#elif __IS_COMPILER_GCC__
58# pragma GCC diagnostic push
59# pragma GCC diagnostic ignored "-Wmissing-declarations"
60# pragma GCC diagnostic ignored "-Wpadded"
71#if defined(__IS_COMPILER_GCC__) && __IS_COMPILER_GCC__ && __ARM_2D_HAS_HELIUM__
73# ifndef __ARM_2D_SUPPRESS_GCC_HELIUM_PATCH_WARNING__
74# pragma GCC warning "As GCC has compilation issues for supporting Helium,\
75 the scalar version is used. You can define a macro\
76 __ARM_2D_SUPPRESS_GCC_HELIUM_PATCH_WARNING__ to suppress this warning."
79# undef __ARM_2D_HAS_HELIUM__
80# undef __ARM_2D_HAS_HELIUM_INTEGER__
81# undef __ARM_2D_HAS_HELIUM_FLOAT__
83# define __ARM_2D_HAS_HELIUM__ 0
84# define __ARM_2D_HAS_HELIUM_INTEGER__ 0
85# define __ARM_2D_HAS_HELIUM_FLOAT__ 0
299 ARM_2D_COLOUR_SZ_msk = (0x07 << 1),
301 ARM_2D_COLOUR_LITTLE_ENDIAN = 0,
302 ARM_2D_COLOUR_BIG_ENDIAN = 1,
304 ARM_2D_COLOUR_LITTLE_ENDIAN_msk = ARM_2D_COLOUR_LITTLE_ENDIAN << 4,
305 ARM_2D_COLOUR_BIG_ENDIAN_msk = ARM_2D_COLOUR_BIG_ENDIAN << 4,
307 ARM_2D_COLOUR_NO_ALPHA = 0,
308 ARM_2D_COLOUR_HAS_ALPHA = 1,
310 ARM_2D_COLOUR_NO_ALPHA_msk = ARM_2D_COLOUR_NO_ALPHA << 0,
311 ARM_2D_COLOUR_HAS_ALPHA_msk = ARM_2D_COLOUR_HAS_ALPHA << 0,
313 ARM_2D_COLOUR_VARIANT_pos = 5,
314 ARM_2D_COLOUR_VARIANT_msk = 0x07 << ARM_2D_COLOUR_VARIANT_pos,
318#define ARM_2D_M_COLOUR_SZ_1BIT 0
319#define ARM_2D_M_COLOUR_SZ_2BIT 1
320#define ARM_2D_M_COLOUR_SZ_4BIT 2
321#define ARM_2D_M_COLOUR_SZ_8BIT 3
322#define ARM_2D_M_COLOUR_SZ_16BIT 4
323#define ARM_2D_M_COLOUR_SZ_32BIT 5
325#define ARM_2D_M_COLOUR_SZ_1BIT_msk (ARM_2D_M_COLOUR_SZ_1BIT << 1)
326#define ARM_2D_M_COLOUR_SZ_2BIT_msk (ARM_2D_M_COLOUR_SZ_2BIT << 1)
327#define ARM_2D_M_COLOUR_SZ_4BIT_msk (ARM_2D_M_COLOUR_SZ_4BIT << 1)
328#define ARM_2D_M_COLOUR_SZ_8BIT_msk (ARM_2D_M_COLOUR_SZ_8BIT << 1)
329#define ARM_2D_M_COLOUR_SZ_16BIT_msk (ARM_2D_M_COLOUR_SZ_16BIT<< 1)
330#define ARM_2D_M_COLOUR_SZ_32BIT_msk (ARM_2D_M_COLOUR_SZ_32BIT<< 1)
331#define ARM_2D_M_COLOUR_SZ_msk (0x07 << 1),
333#define ARM_2D_M_COLOUR_LITTLE_ENDIAN 0
334#define ARM_2D_M_COLOUR_BIG_ENDIAN 1
336#define ARM_2D_M_COLOUR_LITTLE_ENDIAN_msk (ARM_2D_M_COLOUR_LITTLE_ENDIAN << 4)
337#define ARM_2D_M_COLOUR_BIG_ENDIAN_msk (ARM_2D_M_COLOUR_BIG_ENDIAN << 4)
339#define ARM_2D_M_COLOUR_NO_ALPHA 0
340#define ARM_2D_M_COLOUR_HAS_ALPHA 1
342#define ARM_2D_M_COLOUR_NO_ALPHA_msk (ARM_2D_M_COLOUR_NO_ALPHA << 0)
343#define ARM_2D_M_COLOUR_HAS_ALPHA_msk (ARM_2D_M_COLOUR_HAS_ALPHA << 0)
345#define ARM_2D_M_COLOUR_VARIANT_pos 5
346#define ARM_2D_M_COLOUR_VARIANT_msk (0x07<<ARM_2D_M_COLOUR_VARIANT_pos)
353 ARM_2D_COLOUR_MONOCHROME = ARM_2D_COLOUR_SZ_1BIT_msk,
354 ARM_2D_COLOUR_BIN = ARM_2D_COLOUR_SZ_1BIT_msk,
355 ARM_2D_COLOUR_1BIT = ARM_2D_COLOUR_SZ_1BIT_msk,
360 ARM_2D_COLOUR_8BIT = ARM_2D_COLOUR_SZ_8BIT_msk,
361 ARM_2D_COLOUR_GRAY8 = ARM_2D_COLOUR_SZ_8BIT_msk,
362 ARM_2D_COLOUR_MASK_A8 = ARM_2D_COLOUR_SZ_8BIT_msk,
364 ARM_2D_COLOUR_16BIT = ARM_2D_COLOUR_SZ_16BIT_msk,
365 ARM_2D_COLOUR_RGB16 = ARM_2D_COLOUR_SZ_16BIT_msk,
366 ARM_2D_COLOUR_RGB565 = ARM_2D_COLOUR_RGB16,
373 ARM_2D_COLOUR_32BIT = ARM_2D_COLOUR_SZ_32BIT_msk ,
374 ARM_2D_COLOUR_RGB32 = ARM_2D_COLOUR_SZ_32BIT_msk ,
376 ARM_2D_COLOUR_CCCN888 = ARM_2D_COLOUR_RGB32 ,
377 ARM_2D_COLOUR_CCCA8888 = ARM_2D_COLOUR_SZ_32BIT_msk |
378 ARM_2D_COLOUR_HAS_ALPHA_msk ,
380 ARM_2D_COLOUR_RGB888 = ARM_2D_COLOUR_CCCN888 ,
381 ARM_2D_COLOUR_BGRA8888 = ARM_2D_COLOUR_CCCA8888 ,
390 ARM_2D_CHANNEL_8in32 = ARM_2D_COLOUR_SZ_32BIT_msk |
391 ARM_2D_COLOUR_HAS_ALPHA_msk |
392 ARM_2D_COLOUR_VARIANT_msk ,
396#define ARM_2D_M_COLOUR_MONOCHROME ARM_2D_M_COLOUR_SZ_1BIT_msk
397#define ARM_2D_M_COLOUR_BIN ARM_2D_M_COLOUR_SZ_1BIT_msk
398#define ARM_2D_M_COLOUR_1BIT ARM_2D_M_COLOUR_SZ_1BIT_msk
400#define ARM_2D_M_COLOUR_MASK_A2 ARM_2D_M_COLOUR_SZ_2BIT_msk
401#define ARM_2D_M_COLOUR_MASK_A4 ARM_2D_M_COLOUR_SZ_4BIT_msk
403#define ARM_2D_M_COLOUR_8BIT ARM_2D_M_COLOUR_SZ_8BIT_msk
404#define ARM_2D_M_COLOUR_GRAY8 ARM_2D_M_COLOUR_SZ_8BIT_msk
405#define ARM_2D_M_COLOUR_MASK_A8 ARM_2D_M_COLOUR_SZ_8BIT_msk
407#define ARM_2D_M_COLOUR_16BIT ARM_2D_M_COLOUR_SZ_16BIT_msk
408#define ARM_2D_M_COLOUR_RGB16 ARM_2D_M_COLOUR_SZ_16BIT_msk
409#define ARM_2D_M_COLOUR_RGB565 ARM_2D_M_COLOUR_RGB16
416#define ARM_2D_M_COLOUR_32BIT ARM_2D_M_COLOUR_SZ_32BIT_msk
417#define ARM_2D_M_COLOUR_RGB32 ARM_2D_M_COLOUR_SZ_32BIT_msk
419#define ARM_2D_M_COLOUR_CCCN888 ARM_2D_M_COLOUR_RGB32
422#define ARM_2D_M_COLOUR_CCCA8888 ( ARM_2D_M_COLOUR_SZ_32BIT_msk \
423 | ARM_2D_M_COLOUR_HAS_ALPHA_msk)
425#define ARM_2D_M_COLOUR_RGB888 ARM_2D_M_COLOUR_CCCN888
426#define ARM_2D_M_COLOUR_BGRAA8888 ARM_2D_M_COLOUR_CCCA8888
436#define ARM_2D_M_CHANNEL_8in32 ( ARM_2D_M_COLOUR_SZ_32BIT_msk \
437 | ARM_2D_M_COLOUR_HAS_ALPHA_msk) \
438 | ARM_2D_M_COLOUR_VARIANT_msk )
446 uint8_t bHasAlpha : 1;
447 uint8_t u3ColourSZ : 3;
448 uint8_t bBigEndian : 1;
449 uint8_t u3Variant : 3;
511 uint8_t bHasEnforcedColour : 1;
512 uint8_t bDerivedResource : 1;
513 uint8_t bVirtualResource : 1;
547 uint32_t u24SizeInByte : 24;
548 uint32_t u2ItemSize : 3;
549 uint32_t u2Align : 3;
670#define ARM_2D_OP_INFO_PARAM_HAS_SOURCE _BV(0)
671#define ARM_2D_OP_INFO_PARAM_HAS_TARGET _BV(1)
672#define ARM_2D_OP_INFO_PARAM_HAS_SOURCE_MASK _BV(2)
673#define ARM_2D_OP_INFO_PARAM_HAS_TARGET_MASK _BV(3)
674#define ARM_2D_OP_INFO_PARAM_HAS_ORIGIN _BV(4)
677#define ARM_2D_OP_INFO_PARAM_TILES_MASK ( \
678 ARM_2D_OP_INFO_PARAM_HAS_SOURCE | \
679 ARM_2D_OP_INFO_PARAM_HAS_TARGET | \
680 ARM_2D_OP_INFO_PARAM_HAS_SOURCE_MASK | \
681 ARM_2D_OP_INFO_PARAM_HAS_TARGET_MASK | \
682 ARM_2D_OP_INFO_PARAM_HAS_ORIGIN )
696 uint8_t bHasSource : 1;
697 uint8_t bHasTarget : 1;
698 uint8_t bHasSrcMask : 1;
699 uint8_t bHasDesMask : 1;
700 uint8_t bHasOrigin : 1;
702 uint8_t bAllowEnforcedColour : 1;
707 uint8_t chInClassOffset;
716 uint8_t CopyOrigLike;
717 uint8_t FillOrigLike;
720 uint8_t TileProcessLike;
722 }LowLevelInterfaceIndex;
758 ARM_2D_PREF_ACC_DONT_CARE = 3,
761#define __ARM_2D_OP_STATUS_BUSY_msk (1 << 4)
762#define __ARM_2D_OP_STATUS_IO_ERROR_msk (1 << 5)
763#define __ARM_2D_OP_STATUS_CPL_msk (1 << 6)
771 uint16_t u4SubTaskCount : 4;
772 uint16_t bIsBusy : 1;
773 uint16_t bIOError : 1;
791 uint8_t u2ACCMethods : 2;
927#if (__ARM_2D_HAS_HELIUM_FLOAT__ || __ARM_2D_HAS_FPU__) \
928 && !__ARM_2D_CFG_FORCED_FIXED_POINT_TRANSFORM__
959#if defined(__clang__)
960#pragma clang diagnostic pop
961#elif __IS_COMPILER_ARM_COMPILER_5__
962#pragma diag_warning 64
963#elif __IS_COMPILER_GCC__
964#pragma GCC diagnostic pop