📄 omap3_defs.h
字号:
//
// Copyright (c) Special Computing. All rights reserved.
//
//------------------------------------------------------------------------------
//
// Header: omap3_defs.h
//
// Defines common macros and types.
//
//------------------------------------------------------------------------------
#ifndef __OMAP3_DEFS_H
#define __OMAP3_DEFS_H
#if __cplusplus
extern "C" {
#endif
#include "types.h"
// common types used for volatile register access
typedef volatile INT8 VINT8, *P_VINT8;
typedef volatile UINT8 VUINT8, *P_VUINT8;
typedef volatile INT16 VINT16, *P_VINT16;
typedef volatile UINT16 VUINT16, *P_VUINT16;
typedef volatile INT32 VINT32, *P_VINT32;
typedef volatile UINT32 VUINT32, *P_VUINT32;
// Bits.
#define BIT0 ( 1u << 0 )
#define BIT1 ( 1u << 1 )
#define BIT2 ( 1u << 2 )
#define BIT3 ( 1u << 3 )
#define BIT4 ( 1u << 4 )
#define BIT5 ( 1u << 5 )
#define BIT6 ( 1u << 6 )
#define BIT7 ( 1u << 7 )
#define BIT8 ( 1u << 8 )
#define BIT9 ( 1u << 9 )
#define BIT10 ( 1u << 10 )
#define BIT11 ( 1u << 11 )
#define BIT12 ( 1u << 12 )
#define BIT13 ( 1u << 13 )
#define BIT14 ( 1u << 14 )
#define BIT15 ( 1u << 15 )
#define BIT16 ( 1u << 16 )
#define BIT17 ( 1u << 17 )
#define BIT18 ( 1u << 18 )
#define BIT19 ( 1u << 19 )
#define BIT20 ( 1u << 20 )
#define BIT21 ( 1u << 21 )
#define BIT22 ( 1u << 22 )
#define BIT23 ( 1u << 23 )
#define BIT24 ( 1u << 24 )
#define BIT25 ( 1u << 25 )
#define BIT26 ( 1u << 26 )
#define BIT27 ( 1u << 27 )
#define BIT28 ( 1u << 28 )
#define BIT29 ( 1u << 29 )
#define BIT30 ( 1u << 30 )
#define BIT31 ( 1u << 31 )
// Blocks.
#define N1KB BIT10 // 1KB block
#define N2KB BIT11 // 2KB block
#define N4KB BIT12 // 4KB block
#define N8KB BIT13 // 8KB block
#define N16KB BIT14 // 16KB block
#define N32KB BIT15 // 32KB block
#define N64KB BIT16 // 64KB block
#define N128KB BIT17 // 128KB block
#define N192KB (N128KB+N64KB) // 192KB block
#define N200KB (N192KB+N8KB) // 200KB block
#define N256KB BIT18 // 256KB block
#define N384KB (N256KB+N128KB) // 384KB block
#define N512KB BIT19 // 512KB block
#define N596KB (596 * 1024) // 596KB block
#define N1MB BIT20 // 1MB block
#define N2MB BIT21 // 2MB block
#define N4MB BIT22 // 4MB block
#define N8MB BIT23 // 8MB block
#define N9MB (N8MB+N1MB) // 9MB block
#define N10MB (N8MB+N2MB) // 10MB block
#define N16MB BIT24 // 16MB block
#define N32MB BIT25 // 32MB block
#define N64MB BIT26 // 64MB block
// Block masks.
#define MASK_32B (0x0000001f)
#define MASK_4KB (0x00000fff)
#define MASK_8KB (0x00001fff)
#define MASK_16KB (0x00003fff)
#define MASK_32KB (0x00007fff)
#define MASK_64KB (0x0000ffff)
#define MASK_128KB (0x0001ffff)
#define MASK_1MB (0x000fffff)
#define MASK_4MB (0x003FFFFF)
#define MASK_8MB (0x007FFFFF)
#define MASK_16MB (0x00ffffff)
#define MASK_32MB (0x01ffffff)
#define MASK_64MB (0x03ffffff)
#define MASK_512MB (0x1fffffff)
#define MASK_1GB (0x3fffffff)
#define MASK_2GB (0x7fffffff)
#if __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -