BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rpusbdisp
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Forest Godfrey
rpusbdisp
Commits
8abc8e67
Commit
8abc8e67
authored
Jan 07, 2014
by
Shikai Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed the endianness bug in checking the device firmware version
parent
2a1cea91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
usbhandlers.c
drivers/linux-driver/src/usbhandlers.c
+7
-5
No files found.
drivers/linux-driver/src/usbhandlers.c
View file @
8abc8e67
...
...
@@ -104,6 +104,8 @@ struct rpusbdisp_dev {
void
*
fb_handle
;
void
*
touch_handle
;
__u16
device_fwver
;
};
#if 0
...
...
@@ -777,7 +779,7 @@ int rpusbdisp_usb_try_send_image(struct rpusbdisp_dev * dev, const pixel_type_t
// do not transmit zero size image
if
(
!
image_size
)
return
1
;
if
(
dev
->
udev
->
descriptor
.
bcdDevice
>=
RP_DISP_FEATURE_RLE_FWVERSION
)
{
if
(
dev
->
device_fwver
>=
RP_DISP_FEATURE_RLE_FWVERSION
)
{
rlemode
=
1
;
}
else
{
rlemode
=
0
;
...
...
@@ -958,12 +960,12 @@ static int _on_new_usb_device(struct rpusbdisp_dev * dev)
_add_usbdev_to_list
(
dev
);
dev
->
dev_id
=
rpusbdisp_usb_get_device_count
();
dev
->
is_alive
=
1
;
dev
->
device_fwver
=
le16_to_cpu
(
dev
->
udev
->
descriptor
.
bcdDevice
);
dev_info
(
&
dev
->
interface
->
dev
,
"RP USB Display found (#%d), Firmware Version: %d.%02d, S/N: %s
\n
"
,
dev
->
dev_id
,
(
dev
->
udev
->
descriptor
.
bcdDevice
>>
8
),
(
dev
->
udev
->
descriptor
.
bcdDevice
&
0xFF
),
(
dev
->
device_fwver
>>
8
),
(
dev
->
device_fwver
&
0xFF
),
dev
->
udev
->
serial
?
dev
->
udev
->
serial
:
"(unknown)"
);
...
...
@@ -1044,7 +1046,7 @@ static int rpusbdisp_probe(struct usb_interface *interface, const struct usb_dev
dev
->
udev
=
usb_get_dev
(
interface_to_usbdev
(
interface
));
dev
->
interface
=
interface
;
if
(
dev
->
udev
->
descriptor
.
bcdDevice
>
0x0200
)
{
if
(
le16_to_cpu
(
dev
->
udev
->
descriptor
.
bcdDevice
)
>
0x0200
)
{
dev_warn
(
&
interface
->
dev
,
"The device you used may requires a newer driver version to work.
\n
"
);
}
...
...
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