You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

5 months ago
/** \file define.h */
#if !defined(DEFINE_H__CB0AACBA_D47E_488E_8E4E_28E3D3453B8C__INCLUDED_)
#define DEFINE_H__CB0AACBA_D47E_488E_8E4E_28E3D3453B8C__INCLUDED_
#define LOW 0
#define HIGH 1
#define SUCCESS 0
#define FAIL !SUCCESS
#define STOP 0
#define START !START
#define DISABLE 0
#define ENABLE !DISABLE
#define SETBIT(ADDRESS,BIT) (ADDRESS |= (1<<BIT))
#define CLEARBIT(ADDRESS,BIT) (ADDRESS &= ~(1<<BIT))
#define TESTBIT(ADDRESS,BIT) ((ADDRESS & (1<<BIT)) ? 1 : 0)
#define TOGGLEBIT(ADDRESS, BIT) (ADDRESS ^= (1<<BIT))
typedef signed char int8_t;
typedef short int16_t;
typedef int int32_t;
typedef long long int64_t;
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
#endif