⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 system.h

📁 em86xx 完整启动程序,支持网络下载与串通下载
💻 H
字号:
/***************************************** Copyright (c) 2002-2004 Sigma Designs, Inc. All Rights Reserved Proprietary and Confidential *****************************************//* This file is part of the boot loader *//* * system.h * * System dependent definitions * * first revision by Ho Lee 12/10/2002 */#ifndef __BOOTLOADER_SYSTEM_H#define __BOOTLOADER_SYSTEM_H/* * Basic type definitions  * for compatibility between system */typedef unsigned char uint8_t;typedef unsigned short uint16_t;typedef unsigned int uint32_t;/* * Endian */static __inline__ unsigned short __swap16(unsigned short x){    return ((unsigned short) ((((unsigned short)(x) & 0x00ff) << 8) |         (((unsigned short)(x) & 0xff00) >> 8)));}static __inline__ unsigned int __swap32(unsigned int x){    return ((unsigned int)((((unsigned int)(x) & 0x000000ffU) << 24) |        (((unsigned int)(x) & 0x0000ff00U) <<  8) |        (((unsigned int)(x) & 0x00ff0000U) >>  8) |        (((unsigned int)(x) & 0xff000000U) >> 24)));}#undef CONFIG_BIGENDIAN#define CONFIG_LITTLEENDIAN#define cpu_to_le(x)            (x)#define cpu_to_be(x)            (__swap32(x))// alignmentstatic __inline__ unsigned short __read16(void *ptr){    unsigned char *bp = (unsigned char *) ptr;    return (bp[0] | (bp[1] << 8));}static __inline__ unsigned int __read32(void *ptr){    unsigned char *bp = (unsigned char *) ptr;    return (bp[0] | (bp[1] << 8) | (bp[2] << 16) | (bp[3] << 24));}static __inline__ void __write16(void *ptr, unsigned short data){    unsigned char *bp = (unsigned char *) ptr;    bp[0] = (data & 0xff);    bp[1] = (data >> 8) & 0xff;}static __inline__ void __write32(void *ptr, unsigned int data){    unsigned char *bp = (unsigned char *) ptr;    bp[0] = (data & 0xff);    bp[1] = (data >> 8) & 0xff;    bp[2] = (data >> 16) & 0xff;    bp[3] = (data >> 24) & 0xff;}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -