Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
drivers
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MLA98
drivers
Commits
621e5571
Commit
621e5571
authored
Nov 02, 2016
by
Jeremy Soller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove resource_sceme, Fix syscall crate name, add fmap
parent
e4b4eb5a
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
30 additions
and
10 deletions
+30
-10
ahcid/Cargo.toml
ahcid/Cargo.toml
+1
-1
e1000d/Cargo.toml
e1000d/Cargo.toml
+1
-1
pcid/Cargo.toml
pcid/Cargo.toml
+1
-3
ps2d/Cargo.toml
ps2d/Cargo.toml
+1
-1
rtl8168d/Cargo.toml
rtl8168d/Cargo.toml
+1
-1
vesad/Cargo.toml
vesad/Cargo.toml
+2
-2
vesad/src/scheme.rs
vesad/src/scheme.rs
+8
-0
vesad/src/screen/graphic.rs
vesad/src/screen/graphic.rs
+8
-0
vesad/src/screen/mod.rs
vesad/src/screen/mod.rs
+2
-0
vesad/src/screen/text.rs
vesad/src/screen/text.rs
+5
-1
No files found.
ahcid/Cargo.toml
View file @
621e5571
...
...
@@ -7,4 +7,4 @@ bitflags = "*"
dma
=
{
path
=
"../../crates/dma/"
}
io
=
{
path
=
"../../crates/io/"
}
spin
=
"*"
syscall
=
{
path
=
"../../syscall/"
}
redox_
syscall
=
{
path
=
"../../syscall/"
}
e1000d/Cargo.toml
View file @
621e5571
...
...
@@ -8,4 +8,4 @@ dma = { path = "../../crates/dma/" }
event
=
{
path
=
"../../crates/event/"
}
io
=
{
path
=
"../../crates/io/"
}
netutils
=
{
path
=
"../../programs/netutils/"
}
syscall
=
{
path
=
"../../syscall/"
}
redox_
syscall
=
{
path
=
"../../syscall/"
}
pcid/Cargo.toml
View file @
621e5571
...
...
@@ -3,11 +3,9 @@ name = "pcid"
version
=
"0.1.0"
[dependencies]
redox_syscall
=
{
path
=
"../../syscall/"
}
rustc-serialize
=
{
git
=
"https://github.com/redox-os/rustc-serialize.git"
}
toml
=
"*"
[dependencies.syscall]
path
=
"../../syscall/"
[replace]
"rustc-serialize:0.3.19"
=
{
git
=
"https://github.com/redox-os/rustc-serialize.git"
}
ps2d/Cargo.toml
View file @
621e5571
...
...
@@ -7,4 +7,4 @@ bitflags = "*"
event
=
{
path
=
"../../crates/event/"
}
io
=
{
path
=
"../../crates/io/"
}
orbclient
=
"0.1"
syscall
=
{
path
=
"../../syscall/"
}
redox_
syscall
=
{
path
=
"../../syscall/"
}
rtl8168d/Cargo.toml
View file @
621e5571
...
...
@@ -8,4 +8,4 @@ dma = { path = "../../crates/dma/" }
event
=
{
path
=
"../../crates/event/"
}
io
=
{
path
=
"../../crates/io/"
}
netutils
=
{
path
=
"../../programs/netutils/"
}
syscall
=
{
path
=
"../../syscall/"
}
redox_
syscall
=
{
path
=
"../../syscall/"
}
vesad/Cargo.toml
View file @
621e5571
...
...
@@ -4,9 +4,9 @@ version = "0.1.0"
[dependencies]
orbclient
=
"0.1"
ransid
=
{
git
=
"https://github.com/redox-os/ransid.git"
}
ransid
=
"0.2"
rusttype
=
{
git
=
"https://github.com/dylanede/rusttype.git"
,
optional
=
true
}
syscall
=
{
path
=
"../../syscall/"
}
redox_syscall
=
"0.1"
[features]
default
=
[]
vesad/src/scheme.rs
View file @
621e5571
...
...
@@ -72,6 +72,14 @@ impl SchemeMut for DisplayScheme {
}
}
fn
fmap
(
&
mut
self
,
id
:
usize
,
offset
:
usize
,
size
:
usize
)
->
Result
<
usize
>
{
if
let
Some
(
screen
)
=
self
.screens
.get
(
&
id
)
{
screen
.map
(
offset
,
size
)
}
else
{
Err
(
Error
::
new
(
EBADF
))
}
}
fn
fpath
(
&
mut
self
,
id
:
usize
,
buf
:
&
mut
[
u8
])
->
Result
<
usize
>
{
let
path_str
=
if
id
==
0
{
format!
(
"display:input"
)
...
...
vesad/src/screen/graphic.rs
View file @
621e5571
...
...
@@ -45,6 +45,14 @@ impl Screen for GraphicScreen {
Ok
(
0
)
}
fn
map
(
&
self
,
offset
:
usize
,
size
:
usize
)
->
Result
<
usize
>
{
if
offset
+
size
<=
self
.display.offscreen
.len
()
*
4
{
Ok
(
self
.display.offscreen
.as_ptr
()
as
usize
+
offset
)
}
else
{
Err
(
Error
::
new
(
EINVAL
))
}
}
fn
input
(
&
mut
self
,
event
:
&
Event
)
{
if
let
EventOption
::
Mouse
(
mut
mouse_event
)
=
event
.to_option
()
{
let
x
=
cmp
::
max
(
0
,
cmp
::
min
(
self
.display.width
as
i32
,
self
.mouse_x
+
mouse_event
.x
));
...
...
vesad/src/screen/mod.rs
View file @
621e5571
...
...
@@ -14,6 +14,8 @@ pub trait Screen {
fn
event
(
&
mut
self
,
flags
:
usize
)
->
Result
<
usize
>
;
fn
map
(
&
self
,
offset
:
usize
,
size
:
usize
)
->
Result
<
usize
>
;
fn
input
(
&
mut
self
,
event
:
&
Event
);
fn
read
(
&
mut
self
,
buf
:
&
mut
[
u8
])
->
Result
<
usize
>
;
...
...
vesad/src/screen/text.rs
View file @
621e5571
...
...
@@ -3,7 +3,7 @@ extern crate ransid;
use
std
::
collections
::{
BTreeSet
,
VecDeque
};
use
orbclient
::{
Event
,
EventOption
};
use
syscall
::
Result
;
use
syscall
::
error
::
*
;
use
display
::
Display
;
use
screen
::
Screen
;
...
...
@@ -48,6 +48,10 @@ impl Screen for TextScreen {
Ok
(
0
)
}
fn
map
(
&
self
,
offset
:
usize
,
size
:
usize
)
->
Result
<
usize
>
{
Err
(
Error
::
new
(
EBADF
))
}
fn
input
(
&
mut
self
,
event
:
&
Event
)
{
let
mut
buf
=
vec!
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment