Wixel SDK
Macros | Typedefs
cc2511_types.h File Reference

Go to the source code of this file.

Macros

#define CODE   __code
 
#define DATA   __data
 
#define PDATA   __pdata
 
#define XDATA   __xdata
 

Typedefs

typedef unsigned char uint8
 
typedef signed char int8
 
typedef unsigned short uint16
 
typedef signed short int16
 
typedef unsigned long uint32
 
typedef signed long int32
 
typedef __bit BIT
 

Detailed Description

This file provides the definitions of useful data types.

Definition in file cc2511_types.h.

Macro Definition Documentation

#define CODE   __code

Specifies that the variable is stored in code space (flash memory). This is a good choice for variables and data structures that never need to be changed. See the SDCC docs for more information.

Definition at line 39 of file cc2511_types.h.

#define DATA   __data

Specifies that the variable is stored in the Fast Access Ram section of the chip, also known as "Internal Ram". This is a good choice for small variables that need to be accessed in many places. Reading and writing DATA variables is faster than reading and writing XDATA variables. There are only 256 bytes of Fast Access Ram, so use this qualifier sparingly.

Besides being faster, another advantage of DATA over XDATA is the ability to do atomic operations. The 8051 instruction set supports several instructions (INC, DEC, ORL, ANL, XRL) that let you read, modify, and write a single byte of internal RAM with one instruction.

Definition at line 52 of file cc2511_types.h.

#define PDATA   __pdata

Specifies that the variable is stored in the paged data area (the first 256 bytes of XDATA). This is the default memory space for variables. Accessing PDATA variables takes less code space than accessing XDATA variables.

Definition at line 58 of file cc2511_types.h.

#define XDATA   __xdata

Specifies that the variable is stored in the Slow Access Ram section of the chip, also known as "External Ram". This is a good choice for large buffers or variables that don't need to be accessed quickly. The CC2511 has 3840 bytes of Slow Access Ram.

Definition at line 65 of file cc2511_types.h.

Typedef Documentation

typedef __bit BIT

A 1-bit value that is stored in the processor's bit-addressable memory region. The CC2511 has 16 bytes of user-defined bit-addressable memory, so you can have at most 128 BIT variables per program.

Definition at line 32 of file cc2511_types.h.

typedef signed short int16

A signed 16-bit integer. The range of this data type is -32,768 to 32,767.

Definition at line 18 of file cc2511_types.h.

typedef signed long int32

A signed 32-bit integer. The range of this data type is -2,147,483,648 to 2,147,483,647.

Definition at line 24 of file cc2511_types.h.

typedef signed char int8

A signed 8-bit integer. The range of this data type is -128 to 127.

Definition at line 12 of file cc2511_types.h.

typedef unsigned short uint16

An unsigned 16-bit integer. The range of this data type is 0 to 65,535.

Definition at line 15 of file cc2511_types.h.

typedef unsigned long uint32

An unsigned 32-bit integer. The range of this data type is 0 to 4,294,967,295.

Definition at line 21 of file cc2511_types.h.

typedef unsigned char uint8

An unsigned 8-bit integer. The range of this data type is 0 to 255.

Definition at line 9 of file cc2511_types.h.