USB_Host_Shield_2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros
avrpins.h File Reference
#include <avr/io.h>
Include dependency graph for avrpins.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TPin< PORT, PIN >
 
class  TCom< TCCR, COM >
 
class  Tp_Tc< Tp_pin, Tc_bit >
 

Macros

#define MAKE_PORT(portName, ddrName, pinName, className, ID)
 
#define MAKE_TCCR(TccrName, className)
 

Macro Definition Documentation

#define MAKE_PORT (   portName,
  ddrName,
  pinName,
  className,
  ID 
)
Value:
class className{\
public:\
typedef uint8_t DataT;\
public:\
static void Write(DataT value){portName = value;}\
static void ClearAndSet(DataT clearMask, DataT value){portName = (portName & ~clearMask) | value;}\
static DataT Read(){return portName;}\
static void DirWrite(DataT value){ddrName = value;}\
static DataT DirRead(){return ddrName;}\
static void Set(DataT value){portName |= value;}\
static void Clear(DataT value){portName &= ~value;}\
static void Toggle(DataT value){portName ^= value;}\
static void DirSet(DataT value){ddrName |= value;}\
static void DirClear(DataT value){ddrName &= ~value;}\
static void DirToggle(DataT value){ddrName ^= value;}\
static DataT PinRead(){return pinName;}\
enum{Id = ID};\
enum{Width=sizeof(DataT)*8};\
};
#define MAKE_TCCR (   TccrName,
  className 
)
Value:
class className{\
public:\
typedef uint8_t DataT;\
public:\
static void Write(DataT value){TccrName = value;}\
static void ClearAndSet(DataT clearMask, DataT value){TccrName = (TccrName & ~clearMask) | value;}\
static DataT Read(){return TccrName;}\
static void Set(DataT value){TccrName |= value;}\
static void Clear(DataT value){TccrName &= ~value;}\
static void Toggle(DataT value){TccrName ^= value;}\
enum{Width=sizeof(DataT)*8};\
};