Diff: LPC2368/drv/zg2100/zg_defs.h
- Revision:
- 2:1f10f8ab527b
- Parent:
- 0:0f5a52711275
- Child:
- 3:e02ec42cf9c8
--- a/LPC2368/drv/zg2100/zg_defs.h Mon Jul 19 16:27:52 2010 +0000 +++ b/LPC2368/drv/zg2100/zg_defs.h Thu Jul 22 11:31:59 2010 +0000 @@ -31,8 +31,10 @@ /* Parameters */ -#define ZG_HEAD_BUF_SIZE 16 -#define ZG_FIFO_BUF_SIZE 1024 +#define ZG_HEAD_BUF_SIZE 64//16 +#define ZG_FIFO_BUF_SIZE 2048 + +#define ZG_MAX_TX_PENDING 7 #define ZG_SCAN_PROBE_DELAY 20 //In us #define ZG_SCAN_MIN_CHAN_TIME 400 //In (1024 us) @@ -198,18 +200,18 @@ /* Macro helpers (LE Platform, SPI is BE) */ -#define HTODS( x ) ( ((x<<8) | (x>>8)) & 0xFFFF ) //Host to device, short +#define HTODS( x ) ( (((x)<<8) | ((x)>>8)) & 0xFFFF ) //Host to device, short #define DTOHS( x ) ( HTODS(x) ) //Device to host, short -#define HTODL( x ) ( ( (x & 0x000000FF) << 24 ) \ - | ( (x & 0x0000FF00) << 8 ) \ - | ( (x & 0x00FF0000) >> 8 ) \ - | ( (x & 0xFF000000) >> 24 ) ) //Host to device, long +#define HTODL( x ) ( ( ((x) & 0x000000FF) << 24 ) \ + | ( ((x) & 0x0000FF00) << 8 ) \ + | ( ((x) & 0x00FF0000) >> 8 ) \ + | ( ((x) & 0xFF000000) >> 24 ) ) //Host to device, long #define DTOHL( x ) ( HTODL(x) ) /* Platform Specific defs */ -#define ZG_MEM __attribute((section("AHBSRAM0"))) +#define ZG_MEM __attribute((section("AHBSRAM1"))) /* Typedefs */