SPLASH_HEADER SplashHeader; // 这是一个结构体类型
read_dpp3430_i2c(DPP3430_DEV_ADDR, READ_SPLASH_SCREEN_HEADER, &Param, 1, (uint08 *)&SplashHeader, sizeof (SplashHeader)); // 这是一个函数调用
请问(uint08 *)&SplashHeader是什么意思?sizeof (SplashHeader)是什么意思?
结构体内部为:
typedef struct
{
uint16 Image_width; /**< width of image in pixels */
uint16 Image_height; /**< height of image in pixels */
uint32 Byte_count; /**< number of bytes starting at "data" */
uint08 Pixel_format; /**< format of pixel data */
/**< 0 = 24-bit unpacked: 0x00RRGGBB Not supported by DDP2230/DDPDDP243x*/
/**< 1 = 24-bit packed: RGB 8-8-8 */
/**< 2 = 16-bit: RGB 5-6-5 DDP3020 only */
/**< 3 = 16-bit: YCrCb 4:2:2 DDP2230/DDPDDP243x only */
uint08 Compression; /**< compression of image */
/**< SPLASH_FORCE_UNCOMPRESSED = uncompressed */
/**< SPLASH_FORCE_RLE = RLE compressed */
/**< SPLASH_USER_DEFINED = User Defined Compression */
/**< SPLASH_FORCE_RLE_2PIXEL = RLE compressed 2Pixel */
uint08 ByteOrder; /**< 0 - pixel is 00RRGGBB - DDP3020 */
/**< 1 - pixel is 00GGRRBB - DDP2230/DDPDDP243x */
uint08 ChromaOrder; /**< Indicates chroma order of pixel data (DDP2230/DDPDDP243x only) */
/**< 0 - Cr is first pixel (0xYYRR) */
/**< 1 - Cb is first pixel (0xYYBB) */
} SPLASH_HEADER;
此帖出自
小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
sizeof的作用知道一点,但是用在结构体上面,我就不明白了
一周热门 更多>