Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Variables
atmel_read_eeprom.h File Reference
#include <linux/types.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <asm/pci.h>
#include <asm/io.h>
#include <linux/init.h>
#include <asm/termios.h>
#include <asm/ioctls.h>
#include <linux/ioctl.h>
#include <linux/fcntl.h>

Go to the source code of this file.

Macros

#define DEFAULT_PORT   "/dev/ttyS0" /* Port to open */
 
#define TXX   0 /* Dummy loop for spinning */
 
#define BLOCK_SEL   0x00
 
#define SLAVE_ADDR   0xa0
 
#define READ_BIT   0x01
 
#define WRITE_BIT   0x00
 
#define R_HEADER   SLAVE_ADDR + BLOCK_SEL + READ_BIT
 
#define W_HEADER   SLAVE_ADDR + BLOCK_SEL + WRITE_BIT
 
#define vcc_off   (ioctl(fd, TIOCSBRK, 0))
 
#define vcc_on   (ioctl(fd, TIOCCBRK, 0))
 
#define sda_hi   (ioctl(fd, TIOCMBIS, &dtr))
 
#define sda_lo   (ioctl(fd, TIOCMBIC, &dtr))
 
#define scl_lo   (ioctl(fd, TIOCMBIC, &rts))
 
#define scl_hi   (ioctl(fd, TIOCMBIS, &rts))
 

Variables

const char rts = TIOCM_RTS
 
const char dtr = TIOCM_DTR
 
int fd
 

Macro Definition Documentation

#define BLOCK_SEL   0x00

Definition at line 48 of file atmel_read_eeprom.h.

#define DEFAULT_PORT   "/dev/ttyS0" /* Port to open */

Definition at line 45 of file atmel_read_eeprom.h.

#define R_HEADER   SLAVE_ADDR + BLOCK_SEL + READ_BIT

Definition at line 52 of file atmel_read_eeprom.h.

#define READ_BIT   0x01

Definition at line 50 of file atmel_read_eeprom.h.

#define scl_hi   (ioctl(fd, TIOCMBIS, &rts))

Definition at line 63 of file atmel_read_eeprom.h.

#define scl_lo   (ioctl(fd, TIOCMBIC, &rts))

Definition at line 62 of file atmel_read_eeprom.h.

#define sda_hi   (ioctl(fd, TIOCMBIS, &dtr))

Definition at line 60 of file atmel_read_eeprom.h.

#define sda_lo   (ioctl(fd, TIOCMBIC, &dtr))

Definition at line 61 of file atmel_read_eeprom.h.

#define SLAVE_ADDR   0xa0

Definition at line 49 of file atmel_read_eeprom.h.

#define TXX   0 /* Dummy loop for spinning */

Definition at line 46 of file atmel_read_eeprom.h.

#define vcc_off   (ioctl(fd, TIOCSBRK, 0))

Definition at line 58 of file atmel_read_eeprom.h.

#define vcc_on   (ioctl(fd, TIOCCBRK, 0))

Definition at line 59 of file atmel_read_eeprom.h.

#define W_HEADER   SLAVE_ADDR + BLOCK_SEL + WRITE_BIT

Definition at line 53 of file atmel_read_eeprom.h.

#define WRITE_BIT   0x00

Definition at line 51 of file atmel_read_eeprom.h.

Variable Documentation

Definition at line 66 of file atmel_read_eeprom.h.

Definition at line 67 of file atmel_read_eeprom.h.

Definition at line 65 of file atmel_read_eeprom.h.