Created
November 20, 2011 17:57
-
-
Save hidsh/1380587 to your computer and use it in GitHub Desktop.
my standard header file for embedded project using C.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mystd.h */ | |
#ifndef __MYSTD_H__ | |
#define __MYSTD_H__ | |
/* types */ | |
typedef unsigned char u1; | |
typedef unsigned short u2; | |
typedef unsigned long u4; | |
typedef signed char s1; | |
typedef signed short s2; | |
typedef signed long s4; | |
typedef unsigned char bool; | |
#define FALSE 0 | |
#define TRUE 1 | |
#define LO 0 | |
#define HI 1 | |
#define OFF 0 | |
#define ON 1 | |
/* pseudo function */ | |
#define enable_interrupt() sei() | |
#define disable_interrupt() cli() | |
#endif /* __MYSTD_H__ */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment