Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Platform-independent core collection
Manage
Activity
Members
Labels
Plan
Issues
15
Issue boards
Milestones
Wiki
Code
Merge requests
5
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
Platform-independent core collection
Commits
75f51edd
Commit
75f51edd
authored
11 years ago
by
Mathias Kreider
Browse files
Options
Downloads
Patches
Plain Diff
gitignore prevented h files
parent
cb8a6523
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/wishbone/wb_irq/msidemo/display.h
+32
-0
32 additions, 0 deletions
modules/wishbone/wb_irq/msidemo/display.h
modules/wishbone/wb_irq/msidemo/irq.h
+76
-0
76 additions, 0 deletions
modules/wishbone/wb_irq/msidemo/irq.h
with
108 additions
and
0 deletions
modules/wishbone/wb_irq/msidemo/display.h
0 → 100644
+
32
−
0
View file @
75f51edd
#ifndef _DISPLAY_H_
#define _DISPLAY_H_
extern
volatile
unsigned
int
*
display
;
extern
const
unsigned
int
MODE_REG
;
extern
const
unsigned
int
RST_REG
;
extern
const
unsigned
int
UART_REG
;
extern
const
unsigned
int
CHAR_REG
;
extern
const
unsigned
int
RAW_REG
;
extern
const
char
MODE_RAW
;
extern
const
char
MODE_UART
;
extern
const
char
MODE_CHAR
;
extern
const
char
MODE_IDLE
;
extern
const
char
ROW_LEN
;
void
disp_put_c
(
char
ascii
);
void
disp_put_int
(
int
number
);
void
disp_put_str
(
const
char
*
sPtr
);
void
disp_put_line
(
const
char
*
sPtr
,
unsigned
char
row
);
void
disp_reset
();
void
disp_loc_c
(
char
ascii
,
unsigned
char
row
,
unsigned
char
col
);
void
disp_put_raw
(
char
pixcol
,
unsigned
int
address
,
char
color
);
unsigned
int
get_pixcol_addr
(
unsigned
char
x_in
,
unsigned
char
y_in
);
unsigned
int
get_pixcol_val
(
unsigned
char
y_in
);
#endif
This diff is collapsed.
Click to expand it.
modules/wishbone/wb_irq/msidemo/irq.h
0 → 100644
+
76
−
0
View file @
75f51edd
/** @file irq.h
* @brief Header file for MSI capable IRQ handler for the LM32
*
* Copyright (C) 2011-2012 GSI Helmholtz Centre for Heavy Ion Research GmbH
*
* Usage:
*
* void <an ISR>(void) { <evaluate global_msi and do something useful> }
* ...
* void _irq_entry(void) {irq_process();}
* ...
* void main(void) {
*
* isr_table_clr();
* isr_ptr_table[0]= <an ISR>;
* isr_ptr_table[1]= ...
* ...
* irq_set_mask(0x03); //Enable used IRQs ...
* irq_enable();
* ...
* }
*
* @author Mathias Kreider <m.kreider@gsi.de>
*
* @bug None!
*
*******************************************************************************
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*******************************************************************************
*/
#ifndef __IRQ_H_
#define __IRQ_H_
typedef
struct
{
unsigned
int
msg
;
unsigned
int
src
;
unsigned
int
sel
;
}
msi
;
//ISR function pointer table
typedef
void
(
*
isr_ptr_t
)(
void
);
isr_ptr_t
isr_ptr_table
[
32
];
//Global containing last processed MSI message
volatile
msi
global_msi
;
inline
void
irq_pop_msi
(
unsigned
int
irq_no
);
inline
unsigned
int
irq_get_mask
(
void
);
inline
void
irq_set_mask
(
unsigned
int
im
);
inline
void
irq_disable
(
void
);
inline
void
irq_enable
(
void
);
inline
void
irq_clear
(
unsigned
int
mask
);
inline
void
isr_table_clr
(
void
);
inline
void
irq_process
(
void
);
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment