32 lines
805 B
C
32 lines
805 B
C
![]() |
#ifndef _ZJD_CONFIG_H_
|
||
|
#define _ZJD_CONFIG_H_
|
||
|
|
||
|
|
||
|
//#define HAVE_BH_PROCESS
|
||
|
//#define HAVE_YX_AUTO_RESET
|
||
|
|
||
|
#ifdef MCU_BIG_ENDIAN
|
||
|
#define HTONB(A) ((((BYTE)(A) & 0xf0) >> 4) | \
|
||
|
(((BYTE)(A) & 0x0f) << 4))
|
||
|
#else
|
||
|
#define HTONB(A) ((BYTE)(A))
|
||
|
#endif
|
||
|
|
||
|
#ifdef MCU_BIG_ENDIAN
|
||
|
#define HTONS(A) ((((WORD)(A) & 0xff00) >> 8) | \
|
||
|
(((WORD)(A) & 0x00ff) << 8))
|
||
|
#else
|
||
|
#define HTONS(A) ((WORD)(A))
|
||
|
#endif
|
||
|
|
||
|
#ifdef MCU_BIG_ENDIAN
|
||
|
#define HTONL(A) ((((DWORD)(A) & 0xff000000) >> 24) | \
|
||
|
(((DWORD)(A) & 0x00ff0000) >> 8) | \
|
||
|
(((DWORD)(A) & 0x0000ff00) << 8) | \
|
||
|
(((DWORD)(A) & 0x000000ff) << 24))
|
||
|
#else
|
||
|
#define HTONL(A) ((DWORD)(A))
|
||
|
#endif
|
||
|
|
||
|
#endif //_ZJD_CONFIG_H_
|