2026-03-20 21:16:58 +08:00
|
|
|
|
/********************************************************************************************************
|
|
|
|
|
|
** ȫ<EFBFBD>ֳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӳ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD>
|
|
|
|
|
|
**
|
|
|
|
|
|
** Copyright (c) Siargo, Ltd. 2010
|
|
|
|
|
|
** All Rights Reserved.
|
|
|
|
|
|
**
|
|
|
|
|
|
**-------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
********************************************************************************************************/
|
|
|
|
|
|
#ifndef __GlobeTypeDef_H__
|
|
|
|
|
|
#define __GlobeTypeDef_H__
|
|
|
|
|
|
|
|
|
|
|
|
#define __weak __WEAK
|
|
|
|
|
|
|
|
|
|
|
|
#define RAM_START 0x20000600
|
|
|
|
|
|
//typedef u8 u8;
|
|
|
|
|
|
typedef uint8_t u8; // <20><EFBFBD><DEB7><EFBFBD>8λ<38><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
typedef int8_t s8; // <20>з<EFBFBD><D0B7><EFBFBD>8λ<38><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
typedef uint16_t u16; // <20><EFBFBD><DEB7><EFBFBD>16λ<36><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
2026-03-20 21:19:53 +08:00
|
|
|
|
typedef unsigned short int u16;
|
2026-03-20 21:16:58 +08:00
|
|
|
|
typedef int16_t s16; // <20>з<EFBFBD><D0B7><EFBFBD>16λ<36><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
typedef uint32_t u32; // <20><EFBFBD><DEB7><EFBFBD>32λ<32><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
typedef int32_t s32; // <20>з<EFBFBD><D0B7><EFBFBD>32λ<32><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
typedef uint64_t u64; // <20><EFBFBD><DEB7><EFBFBD>64λ<34><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
typedef int64_t s64; // <20>з<EFBFBD><D0B7><EFBFBD>64λ<34><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
typedef float f32; // <20><><EFBFBD><EFBFBD><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>32λ<32><CEBB><EFBFBD>ȣ<EFBFBD>
|
|
|
|
|
|
typedef double f64; // ˫<><CBAB><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>64λ<34><CEBB><EFBFBD>ȣ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
//typedef __IO uint8_t vu8; // <20><EFBFBD><DEB7><EFBFBD>8λ<38><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO int8_t vs8; // <20>з<EFBFBD><D0B7><EFBFBD>8λ<38><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO uint16_t vu16; // <20><EFBFBD><DEB7><EFBFBD>16λ<36><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO int16_t vs16; // <20>з<EFBFBD><D0B7><EFBFBD>16λ<36><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO uint32_t vu32; // <20><EFBFBD><DEB7><EFBFBD>32λ<32><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO int32_t vs32; // <20>з<EFBFBD><D0B7><EFBFBD>32λ<32><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO uint64_t vu64; // <20><EFBFBD><DEB7><EFBFBD>64λ<34><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO int64_t vs64; // <20>з<EFBFBD><D0B7><EFBFBD>64λ<34><CEBB><EFBFBD>ͱ<EFBFBD><CDB1><EFBFBD>
|
|
|
|
|
|
//typedef __IO float vf32; // <20><><EFBFBD><EFBFBD><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>32λ<32><CEBB><EFBFBD>ȣ<EFBFBD>
|
|
|
|
|
|
//typedef __IO double vf64; // ˫<><CBAB><EFBFBD>ȸ<EFBFBD><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>64λ<34><CEBB><EFBFBD>ȣ<EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
//typedef bool INT1;
|
|
|
|
|
|
//typedef unsigned char INT8;
|
|
|
|
|
|
//typedef unsigned char BYTE;
|
|
|
|
|
|
//typedef u16 int INT16;
|
|
|
|
|
|
//typedef unsigned long int INT32;
|
|
|
|
|
|
//typedef unsigned long int INTADC;
|
|
|
|
|
|
|
|
|
|
|
|
/* Public typedef ------------------------------------------------------------*/
|
|
|
|
|
|
/* <20><>/<2F>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD> */
|
|
|
|
|
|
typedef union tagWordType
|
|
|
|
|
|
{
|
|
|
|
|
|
u16 Word;
|
|
|
|
|
|
u8 Byte[2];
|
|
|
|
|
|
} TypeWord;
|
|
|
|
|
|
|
|
|
|
|
|
/* ˫<><CBAB>/<2F><>/<2F>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD> */
|
|
|
|
|
|
typedef union tagLongType
|
|
|
|
|
|
{
|
|
|
|
|
|
u32 DWord;
|
|
|
|
|
|
//float Float;
|
|
|
|
|
|
u16 Word[2];
|
|
|
|
|
|
u8 Byte[4];
|
|
|
|
|
|
} TypeLong;
|
|
|
|
|
|
|
|
|
|
|
|
/* ˫<><CBAB>/<2F><>/<2F>ֽ<EFBFBD><D6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͷ<EFBFBD><CDB6><EFBFBD> */
|
|
|
|
|
|
typedef union tagLongLongType
|
|
|
|
|
|
{
|
|
|
|
|
|
u64 DDWord;
|
|
|
|
|
|
u32 DWord[2];
|
|
|
|
|
|
u16 Word[4];
|
|
|
|
|
|
u8 Byte[8];
|
|
|
|
|
|
} TypeLongLong;
|
|
|
|
|
|
|
|
|
|
|
|
#define BIT0 0x0001
|
|
|
|
|
|
#define BIT1 0x0002
|
|
|
|
|
|
#define BIT2 0x0004
|
|
|
|
|
|
#define BIT3 0x0008
|
|
|
|
|
|
#define BIT4 0x0010
|
|
|
|
|
|
#define BIT5 0x0020
|
|
|
|
|
|
#define BIT6 0x0040
|
|
|
|
|
|
#define BIT7 0x0080
|
|
|
|
|
|
#define BIT8 0x0100
|
|
|
|
|
|
#define BIT9 0x0200
|
|
|
|
|
|
#define BIT10 0x0400
|
|
|
|
|
|
#define BIT11 0x0800
|
|
|
|
|
|
#define BIT12 0x1000
|
|
|
|
|
|
#define BIT13 0x2000
|
|
|
|
|
|
#define BIT14 0x4000
|
|
|
|
|
|
#define BIT15 0x8000
|
|
|
|
|
|
#define BIT16 0x10000
|
|
|
|
|
|
|
|
|
|
|
|
#define BITA BIT10
|
|
|
|
|
|
#define BITB BIT11
|
|
|
|
|
|
#define BITC BIT12
|
|
|
|
|
|
#define BITD BIT13
|
|
|
|
|
|
#define BITE BIT14
|
|
|
|
|
|
#define BITF BIT15
|
|
|
|
|
|
|
|
|
|
|
|
//******************************************************************************
|
|
|
|
|
|
// for port 1 & 2 interrupt
|
|
|
|
|
|
#define BIT0_VECTOR 2
|
|
|
|
|
|
#define BIT1_VECTOR 4
|
|
|
|
|
|
#define BIT2_VECTOR 6
|
|
|
|
|
|
#define BIT3_VECTOR 8
|
|
|
|
|
|
#define BIT4_VECTOR 10
|
|
|
|
|
|
#define BIT5_VECTOR 12
|
|
|
|
|
|
#define BIT6_VECTOR 14
|
|
|
|
|
|
#define BIT7_VECTOR 16
|
|
|
|
|
|
|
|
|
|
|
|
#define OUT_HIGH GPIO_PIN_SET
|
|
|
|
|
|
#define OUT_LOW GPIO_PIN_RESET
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
|
|
{
|
|
|
|
|
|
u32 SampledOver: 1;
|
|
|
|
|
|
u32 ExtPowerInput: 1;
|
|
|
|
|
|
u32 EnableSaveACC: 1;
|
|
|
|
|
|
u32 EnableInit: 1;
|
|
|
|
|
|
u32 CalibMode: 1;
|
|
|
|
|
|
u32 TurnOffSystem: 1;
|
|
|
|
|
|
u32 EnableRead: 1;
|
|
|
|
|
|
u32 EnableD9V2: 1;
|
|
|
|
|
|
u32 EnablePulseUpdate: 1;
|
|
|
|
|
|
u32 EnablePress: 1;
|
|
|
|
|
|
|
|
|
|
|
|
}__SYS_BIT_TypeDef;
|
|
|
|
|
|
|
2026-03-20 21:19:53 +08:00
|
|
|
|
|
2026-03-20 21:16:58 +08:00
|
|
|
|
typedef struct
|
|
|
|
|
|
{
|
|
|
|
|
|
u32 UARTHandle: 1;
|
|
|
|
|
|
u32 I2CHandle: 1;
|
|
|
|
|
|
}__SYS_STATUS_BIT_TypeDef;
|
|
|
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
|
|
{
|
|
|
|
|
|
ADR_0X00 = 0,
|
|
|
|
|
|
ADR_0X01,
|
|
|
|
|
|
ADR_0X02,
|
|
|
|
|
|
ADR_0X03,
|
|
|
|
|
|
ADR_0X04
|
|
|
|
|
|
} __REGADR_TypeDef;
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|