Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

defines.h File Reference

Go to the source code of this file.

Defines

#define MAX_CARDS   48
#define MAX_STACK   64
#define maskMS   "\x00\x80\xC0\xE0\xF0\xF8\xFC\xFE\xFF"
#define maskLS   "\x00\x01\x03\x07\x0F\x1F\x3F\x7F\xFF"
#define _GETBYTE(n)   (n>>3)
#define _GETBIT(n)   (n-(_GETBYTE(n)<<3))
#define _BYTES2BIT(byte, bit)   (_GETBYTE(byte)+bit)
#define GRABBIT(data, bit)   (maskLS[9-bit]&data)>>bit
#define SETERROR(n)   channel[handle].error.last=n

Enumerations

enum  {
  B_SOF = 0, B_ID, B_SRR, B_IDE,
  B_EXT, B_RTR, B_RES, B_DLC,
  B_DAT, B_CRC, B_ACK, B_EOF,
  B__MAX
}
enum  { LEFT, RIGHT }

Functions

int _stdcall rightshifteverything (unsigned char *from, int distance, int size)
int _stdcall setatbit (unsigned char *structure, unsigned char *toset, int start, int size)
int _stdcall getatbit (unsigned char *structure, unsigned char *toset, int start, int size)


Define Documentation

#define _BYTES2BIT byte,
bit   )     (_GETBYTE(byte)+bit)
 

Definition at line 81 of file defines.h.

#define _GETBIT  )     (n-(_GETBYTE(n)<<3))
 

Definition at line 79 of file defines.h.

Referenced by getatbit(), and setatbit().

#define _GETBYTE  )     (n>>3)
 

Definition at line 78 of file defines.h.

Referenced by can_can2raw(), getatbit(), and setatbit().

#define GRABBIT data,
bit   )     (maskLS[9-bit]&data)>>bit
 

Definition at line 84 of file defines.h.

Referenced by vector_canboardread().

#define maskLS   "\x00\x01\x03\x07\x0F\x1F\x3F\x7F\xFF"
 

Definition at line 63 of file defines.h.

Referenced by rightshifteverything(), and setatbit().

#define maskMS   "\x00\x80\xC0\xE0\xF0\xF8\xFC\xFE\xFF"
 

Definition at line 52 of file defines.h.

Referenced by getatbit(), and setatbit().

#define MAX_CARDS   48
 

Definition at line 33 of file defines.h.

#define MAX_STACK   64
 

Definition at line 34 of file defines.h.

#define SETERROR  )     channel[handle].error.last=n
 

Definition at line 86 of file defines.h.

Referenced by can_getchanneloptions(), can_readchannel(), can_setchanneloptions(), and can_writechannel().


Enumeration Type Documentation

anonymous enum
 

Enumerator:
B_SOF 
B_ID 
B_SRR 
B_IDE 
B_EXT 
B_RTR 
B_RES 
B_DLC 
B_DAT 
B_CRC 
B_ACK 
B_EOF 
B__MAX 

Definition at line 36 of file defines.h.

anonymous enum
 

Enumerator:
LEFT 
RIGHT 

Definition at line 73 of file defines.h.


Function Documentation

int _stdcall getatbit unsigned char *  structure,
unsigned char *  toset,
int  start,
int  size
 

Definition at line 159 of file bits.c.

References _GETBIT, _GETBYTE, maskMS, and rightshifteverything().

Referenced by can_getfield().

int _stdcall rightshifteverything unsigned char *  from,
int  distance,
int  size
 

Definition at line 35 of file bits.c.

References maskLS.

Referenced by getatbit(), and setatbit().

int _stdcall setatbit unsigned char *  structure,
unsigned char *  toset,
int  start,
int  size
 

Definition at line 108 of file bits.c.

References _GETBIT, _GETBYTE, maskLS, maskMS, and rightshifteverything().

Referenced by can_can2raw().


Generated on Wed Feb 22 13:31:26 2006 for CANapi by  doxygen 1.4.4