OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [include/] [asm/] [shglports.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
 
2
/* Copyright (C) 1998  Kenneth Albanowski <kjahds@kjahds.com>,
3
 *         1997, 1998  D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca>,
4
 *                     The Silver Hammer Group, Ltd.
5
 */
6
 
7
#ifndef _OR1K_SHGLPORTS_H
8
#define _OR1K_SHGLPORTS_H
9
 
10
#include <linux/config.h>
11
#include <linux/sched.h>
12
 
13
#ifdef CONFIG_SHGLCORE
14
 
15
extern struct semaphore porte_interlock;
16
 
17
struct SHGLCORE_PORT_QS {
18
  unsigned char
19
  nullqs:1, /* COM1TX */
20
  sbin:1,   /* PQS6 (PCS3) */
21
  sbclk:1,  /* PQS5 (PCS2) */
22
  sbout:1,  /* PQS4 (PCS1) */
23
  null4:4;  /* MISO, MOSI, SCLK, /SS=PCS0 */
24
};
25
 
26
#define PORT_QS ((volatile struct SHGLCORE_PORT_QS*)PORTQS_ADDR)
27
 
28
struct SHGLCORE_PORT_E {
29
  unsigned char
30
  dead:1,       /* LED */
31
  sbirigb:1,    /* PE6 */
32
  ds:1,         /* /DS */
33
  nulle1:1,     /* na */
34
  sbpll:1,      /* PE3 */
35
  avec:1,       /* /AVEC */
36
  sbsrom:1,     /* PE1 */
37
  sbpanel:1;    /* PE0 */
38
};
39
 
40
#define PORT_E ((volatile struct SHGLCORE_PORT_E*)PORTE_ADDR)
41
 
42
struct SHGLCORE_PORT_F {
43
  unsigned char
44
  nullf1:4,
45
  nullf2:4;
46
};
47
 
48
#define PORT_F ((volatile struct SHGLCORE_PORT_F*)PORTF_ADDR)
49
 
50
extern int comm_status_led, comm_error_led, alarm_led;
51
 
52
static inline void SET_COMM_STATUS_LED(int value) {
53
        BYTE_REF(SHGLCORE_ACC_ADDR+0x100+0) = comm_status_led = value;
54
}
55
static inline int GET_COMM_STATUS_LED(void) {
56
        return comm_status_led;
57
}
58
 
59
 
60
static inline void SET_COMM_ERROR_LED(int value) {
61
        BYTE_REF(SHGLCORE_ACC_ADDR+0x100+1) = comm_error_led = value;
62
}
63
static inline int GET_COMM_ERROR_LED(void) {
64
        return comm_error_led;
65
}
66
 
67
 
68
static inline void SET_ALARM_LED(int value) {
69
        BYTE_REF(SHGLCORE_ACC_ADDR+0x100+2) = alarm_led = value;
70
}
71
static inline int GET_ALARM_LED(void) {
72
        return alarm_led;
73
}
74
 
75
#endif
76
 
77
#endif /* _OR1K_SHGLPORTS_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.