x393_macro.h 1.01 KB
Newer Older
1 2 3 4 5 6 7
/**
 * @file x393_macro.h
 * @brief This file contains various macros used in multiple files.
 */
#ifndef _X393_MACRO
#define _X393_MACRO

8 9 10 11 12 13 14 15
/** @brief Number of image channels */
#define IMAGE_CHN_NUM        4

/** @brief Resolution of current/OEF pointer in bits */
#define OFFSET256_CNTR_RES   26

#define CHUNK_SIZE           32

16 17 18
/** @brief The size of #interframe_params_t structure in double words */
#define INTERFRAME_PARAMS_SZ 8

19 20 21
#define MARKER_FF            0xff000000

#define FRAME_LENGTH_MASK    0xffffff
22

23 24 25 26
#define IRQ_NOP              0
#define IRQ_CLEAR            1
#define IRQ_DISABLE          2
#define IRQ_ENABLE           3
27

28 29 30
#define BYTE2DW(x)           ((x) >> 2)
#define DW2BYTE(x)           ((x) << 2)

31 32
/* These macro were removed from sensor_common.h*/
#define X313_LENGTH_MASK      0xff000000
33 34
#define X393_BUFFSUB(x, y) (((x) >= (y)) ? ((x)-(y)) : ((x) + (CCAM_DMA_SIZE -(y))))
#define X393_BUFFADD(x, y) ((((x) + (y)) <= CCAM_DMA_SIZE) ? ((x) + (y)) : ((x) - (CCAM_DMA_SIZE -(y))))
35

36
#endif /* _X393_MACRO */