a502322188
손상된 .git 히스토리(missing tree)로 재초기화 후 작업트리 전체 커밋. .claude/ 만 제외(로컬 에이전트 설정). 구 저장소 백업(.git_corrupt_backup/) 포함. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
73 lines
3.2 KiB
C
73 lines
3.2 KiB
C
//=============================================================================
|
|
// S E N S I R I O N AG, Laubisruetistr. 50, CH-8712 Staefa, Switzerland
|
|
//=============================================================================
|
|
// Project : SHT3x Sample Code (V1.1)
|
|
// File : typedefs.h (V1.1)
|
|
// Author : RFU
|
|
// Date : 6-Mai-2015
|
|
// Controller: STM32F100RB
|
|
// IDE : µVision V5.12.0.0
|
|
// Compiler : Armcc
|
|
// Brief : Definitions of typedefs for good readability and portability.
|
|
//=============================================================================
|
|
|
|
|
|
//-- Defines ------------------------------------------------------------------
|
|
//Processor endian system
|
|
//#define BIG ENDIAN //e.g. Motorola (not tested at this time)
|
|
#define LITTLE_ENDIAN //e.g. PIC, 8051, NEC V850
|
|
//=============================================================================
|
|
// basic types: making the size of types clear
|
|
//=============================================================================
|
|
typedef unsigned char u8t; ///< range: 0 .. 255
|
|
typedef signed char i8t; ///< range: -128 .. +127
|
|
|
|
typedef unsigned short u16t; ///< range: 0 .. 65535
|
|
typedef signed short i16t; ///< range: -32768 .. +32767
|
|
|
|
typedef unsigned long u32t; ///< range: 0 .. 4'294'967'295
|
|
typedef signed long i32t; ///< range: -2'147'483'648 .. +2'147'483'647
|
|
|
|
typedef float ft; ///< range: +-1.18E-38 .. +-3.39E+38
|
|
typedef double dt; ///< range: .. +-1.79E+308
|
|
|
|
typedef enum{
|
|
bFALSE = 0,
|
|
bTRUE = 1
|
|
}bt;
|
|
|
|
typedef union {
|
|
u16t u16; // element specifier for accessing whole u16
|
|
i16t i16; // element specifier for accessing whole i16
|
|
struct {
|
|
#ifdef LITTLE_ENDIAN // Byte-order is little endian
|
|
u8t u8L; // element specifier for accessing low u8
|
|
u8t u8H; // element specifier for accessing high u8
|
|
#else // Byte-order is big endian
|
|
u8t u8H; // element specifier for accessing low u8
|
|
u8t u8L; // element specifier for accessing high u8
|
|
#endif
|
|
} s16; // element spec. for acc. struct with low or high u8
|
|
} nt16;
|
|
|
|
typedef union {
|
|
u32t u32; // element specifier for accessing whole u32
|
|
i32t i32; // element specifier for accessing whole i32
|
|
struct {
|
|
#ifdef LITTLE_ENDIAN // Byte-order is little endian
|
|
u16t u16L; // element specifier for accessing low u16
|
|
u16t u16H; // element specifier for accessing high u16
|
|
#else // Byte-order is big endian
|
|
u16t u16H; // element specifier for accessing low u16
|
|
u16t u16L; // element specifier for accessing high u16
|
|
#endif
|
|
} s32; // element spec. for acc. struct with low or high u16
|
|
} nt32;
|
|
|
|
typedef enum{
|
|
NO_ERROR = 0x00, // no error
|
|
ACK_ERROR = 0x01, // no acknowledgment error
|
|
CHECKSUM_ERROR = 0x02, // checksum mismatch error
|
|
TIMEOUT_ERROR = 0x04, // timeout error
|
|
PARM_ERROR = 0x80, // parameter out of range error
|
|
}etError; |