User manual
 

Predefined Types, Macros and Constants

Processor Expert generates definitions of all hardware register structures to the file IO_Map.h. The Processor Expert type definitions are generated to the file PE_Types.h which also containins definitions of macros used for a peripheral register access.

Types

Type Description Supported for
byte 8-bit unsigned integer (unsigned char) all
bool Boolean value (unsigned char) (TRUE = any non-zero value / FALSE = 0) all
word 16-bit unsigned integer (unsigned int) all
dword 32-bit unsigned integer (unsigned long) all
dlong array of two 32-bit unsigned integers (unsigned long) all
TPE_ErrCode Error code (uint8_t) all except MPC55xx

Structure for images

typedef struct {          /* Image */
  word width;             /* Image width in pixels */
  word height;            /* Image height in pixels */
  byte *pixmap;           /* Image pixel bitmap */
  word size;              /* Image size in bytes */
  char *name;             /* Image name */
} TIMAGE;
typedef TIMAGE* PIMAGE ; /* Pointer to image */

Structure for 16-bit register:

/* 16-bit register (big endian format) */
  typedef union {
     word w;
     struct {
       byte high,low;
     } b;
  } TWREG;
  

Macros

  __DI()             - Disable global interrupts
  __EI()             - Enable global interrupts
  
  EnterCritical()    - It saves CCR register and disable
                       global interrupts
  ExitCritical()     - It restores CCR register saved
                       in EnterCritical()
  
For the list of macros available for Peripheral registers access, please see the chapter Registers Access of the Processor Expert main help.

Constants

Methods Error Codes

The error codes are defined in the PE_Error module. Error code value is 8-bit unsigned byte. Range 0 - 127 is reserved for PE, and 128 - 255 for user.

ERR_OK 0 OK
ERR_SPEED 1 This device does not work in the active speed mode
ERR_RANGE 2 Parameter out of range
ERR_VALUE 3 Parameter of incorrect value
ERR_OVERFLOW 4 Timer overflow
ERR_MATH 5 Overflow during evaluation
ERR_ENABLED 6 Device is enabled
ERR_DISABLED 7 Device is disabled
ERR_BUSY 8 Device is busy
ERR_NOTAVAIL 9 Requested value not available
ERR_RXEMPTY 10 No data in receiver
ERR_TXFULL 11 Transmitter is full
ERR_BUSOFF 12 Bus not available
ERR_OVERRUN 13 Overrun is present
ERR_FRAMING 14 Framing error is detected
ERR_PARITY 15 Parity error is detected
ERR_NOISE 16 Noise error is detected
ERR_IDLE 17 Idle error is detected
ERR_FAULT 18 Fault error is detected
ERR_BREAK 19 Break char is received during communication
ERR_CRC 20 CRC error is detected
ERR_ARBITR 21 A node loses arbitration. This error occurs if two nodes start transmission at the same time
ERR_PROTECT 22 Protection error is detected.
ERR_UNDERFLOW 23 Underflow error is detected.
ERR_UNDERRUN 24 Underrun error is detected.
ERR_COMMON 25 General unspecified error of a device. The user can get a specific error code using the method GetError.
ERR_LINSYNC 26 LIN synchronization error is detected
ERR_FAILED 27 Requested functionality or process failed.
ERR_QFULL 28 Queue is full.

Version Specific Information for 56800/E
For information on SDK constants definitions please follow to the page SDK types.