Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
io.h File Reference
#include <linux/spinlock.h>
#include <hwregs/reg_map.h>
#include <hwregs/reg_rdwr.h>
#include <hwregs/gio_defs.h>

Go to the source code of this file.

Data Structures

struct  crisv32_ioport
 
struct  crisv32_iopin
 

Macros

#define CRIS_LED_OFF   0x00
 
#define CRIS_LED_GREEN   0x01
 
#define CRIS_LED_RED   0x02
 
#define CRIS_LED_ORANGE   (CRIS_LED_GREEN | CRIS_LED_RED)
 
#define CRIS_LED_NETWORK_GRP0_SET(x)   while (0) {}
 
#define CRIS_LED_NETWORK_GRP0_SET_G(x)   crisv32_io_set(&crisv32_led_net0_green, !(x));
 
#define CRIS_LED_NETWORK_GRP0_SET_R(x)   crisv32_io_set(&crisv32_led_net0_red, !(x));
 
#define CRIS_LED_NETWORK_GRP1_SET(x)   while (0) {}
 
#define CRIS_LED_NETWORK_GRP1_SET_G(x)   crisv32_io_set(&crisv32_led_net1_green, !(x));
 
#define CRIS_LED_NETWORK_GRP1_SET_R(x)   crisv32_io_set(&crisv32_led_net1_red, !(x));
 
#define CRIS_LED_ACTIVE_SET(x)
 
#define CRIS_LED_ACTIVE_SET_G(x)   crisv32_io_set(&crisv32_led2_green, !(x));
 
#define CRIS_LED_ACTIVE_SET_R(x)   crisv32_io_set(&crisv32_led2_red, !(x));
 
#define CRIS_LED_DISK_WRITE(x)
 
#define CRIS_LED_DISK_READ(x)   crisv32_io_set(&crisv32_led3_green, !(x));
 

Enumerations

enum  crisv32_io_dir { crisv32_io_dir_in = 0, crisv32_io_dir_out = 1 }
 

Functions

int crisv32_io_get (struct crisv32_iopin *iopin, unsigned int port, unsigned int pin)
 
int crisv32_io_get_name (struct crisv32_iopin *iopin, const char *name)
 

Variables

struct crisv32_ioport crisv32_ioports []
 
struct crisv32_iopin crisv32_led1_green
 
struct crisv32_iopin crisv32_led1_red
 
struct crisv32_iopin crisv32_led2_green
 
struct crisv32_iopin crisv32_led2_red
 
struct crisv32_iopin crisv32_led3_green
 
struct crisv32_iopin crisv32_led3_red
 
struct crisv32_iopin crisv32_led_net0_green
 
struct crisv32_iopin crisv32_led_net0_red
 
struct crisv32_iopin crisv32_led_net1_green
 
struct crisv32_iopin crisv32_led_net1_red
 

Macro Definition Documentation

#define CRIS_LED_ACTIVE_SET (   x)
Value:
do { \
CRIS_LED_ACTIVE_SET_G((x) & CRIS_LED_GREEN); \
CRIS_LED_ACTIVE_SET_R((x) & CRIS_LED_RED); \
} while (0)

Definition at line 122 of file io.h.

#define CRIS_LED_ACTIVE_SET_G (   x)    crisv32_io_set(&crisv32_led2_green, !(x));

Definition at line 128 of file io.h.

#define CRIS_LED_ACTIVE_SET_R (   x)    crisv32_io_set(&crisv32_led2_red, !(x));

Definition at line 130 of file io.h.

#define CRIS_LED_DISK_READ (   x)    crisv32_io_set(&crisv32_led3_green, !(x));

Definition at line 137 of file io.h.

#define CRIS_LED_DISK_WRITE (   x)
Value:
do{\
crisv32_io_set(&crisv32_led3_green, !(x)); \
crisv32_io_set(&crisv32_led3_red, !(x)); \
}while(0)

Definition at line 132 of file io.h.

#define CRIS_LED_GREEN   0x01

Definition at line 86 of file io.h.

#define CRIS_LED_NETWORK_GRP0_SET (   x)    while (0) {}

Definition at line 97 of file io.h.

#define CRIS_LED_NETWORK_GRP0_SET_G (   x)    crisv32_io_set(&crisv32_led_net0_green, !(x));

Definition at line 100 of file io.h.

#define CRIS_LED_NETWORK_GRP0_SET_R (   x)    crisv32_io_set(&crisv32_led_net0_red, !(x));

Definition at line 103 of file io.h.

#define CRIS_LED_NETWORK_GRP1_SET (   x)    while (0) {}

Definition at line 113 of file io.h.

#define CRIS_LED_NETWORK_GRP1_SET_G (   x)    crisv32_io_set(&crisv32_led_net1_green, !(x));

Definition at line 116 of file io.h.

#define CRIS_LED_NETWORK_GRP1_SET_R (   x)    crisv32_io_set(&crisv32_led_net1_red, !(x));

Definition at line 119 of file io.h.

#define CRIS_LED_OFF   0x00

Definition at line 85 of file io.h.

#define CRIS_LED_ORANGE   (CRIS_LED_GREEN | CRIS_LED_RED)

Definition at line 88 of file io.h.

#define CRIS_LED_RED   0x02

Definition at line 87 of file io.h.

Enumeration Type Documentation

Enumerator:
crisv32_io_dir_in 
crisv32_io_dir_out 

Definition at line 9 of file io.h.

Function Documentation

int crisv32_io_get ( struct crisv32_iopin iopin,
unsigned int  port,
unsigned int  pin 
)

Definition at line 100 of file io.c.

int crisv32_io_get_name ( struct crisv32_iopin iopin,
const char name 
)

Definition at line 117 of file io.c.

Variable Documentation

struct crisv32_ioport crisv32_ioports[]

Definition at line 18 of file io.c.

struct crisv32_iopin crisv32_led1_green
struct crisv32_iopin crisv32_led1_red
struct crisv32_iopin crisv32_led2_green

Definition at line 43 of file io.c.

struct crisv32_iopin crisv32_led2_red

Definition at line 44 of file io.c.

struct crisv32_iopin crisv32_led3_green

Definition at line 45 of file io.c.

struct crisv32_iopin crisv32_led3_red

Definition at line 46 of file io.c.

struct crisv32_iopin crisv32_led_net0_green

Definition at line 41 of file io.c.

struct crisv32_iopin crisv32_led_net0_red

Definition at line 42 of file io.c.

struct crisv32_iopin crisv32_led_net1_green

Definition at line 59 of file io.c.

struct crisv32_iopin crisv32_led_net1_red

Definition at line 60 of file io.c.