Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
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
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
30d67668
Commit
30d67668
authored
14 years ago
by
patacongo
Browse files
Options
Downloads
Patches
Plain Diff
cosmetic
git-svn-id:
svn://svn.code.sf.net/p/nuttx/code/trunk@2685
42af7a65-404d-4744-a932-0658087f49c3
parent
4cf3b59f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
configs/lm3s6965-ek/nx/defconfig
+1
-1
1 addition, 1 deletion
configs/lm3s6965-ek/nx/defconfig
drivers/lcd/p14201.c
+38
-24
38 additions, 24 deletions
drivers/lcd/p14201.c
with
39 additions
and
25 deletions
configs/lm3s6965-ek/nx/defconfig
+
1
−
1
View file @
30d67668
...
@@ -568,7 +568,7 @@ CONFIG_LCD_MAXCONTRAST=255
...
@@ -568,7 +568,7 @@ CONFIG_LCD_MAXCONTRAST=255
CONFIG_NX_MOUSE=y
CONFIG_NX_MOUSE=y
CONFIG_NX_KBD=y
CONFIG_NX_KBD=y
#CONFIG_NXTK_BORDERWIDTH=4
#CONFIG_NXTK_BORDERWIDTH=4
CONFIG_NXTK_BORDERCOLOR1=
6
CONFIG_NXTK_BORDERCOLOR1=
8
CONFIG_NXTK_BORDERCOLOR2=4
CONFIG_NXTK_BORDERCOLOR2=4
CONFIG_NXTK_AUTORAISE=n
CONFIG_NXTK_AUTORAISE=n
CONFIG_NXFONT_SANS=y
CONFIG_NXFONT_SANS=y
...
...
This diff is collapsed.
Click to expand it.
drivers/lcd/p14201.c
+
38
−
24
View file @
30d67668
...
@@ -729,37 +729,30 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
...
@@ -729,37 +729,30 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
* the run starts at &run[start] and continues through run[end-1].
* the run starts at &run[start] and continues through run[end-1].
* However, the first and final pixels at these locations may
* However, the first and final pixels at these locations may
* not be byte aligned.
* not be byte aligned.
*/
start
=
col
>>
1
;
aend
=
(
col
+
npixels
)
>>
1
;
end
=
(
col
+
npixels
+
1
)
>>
1
;
ritdbg
(
"start: %d aend: %d end: %d
\n
"
,
start
,
aend
,
end
);
/* Copy the run into the framebuffer, handling nibble alignment.
*
*
* example col=7 npixels = 8 example col=6 npixels=8
* CASE 1: First pixel X position is byte aligned
*
* example col=6 npixels = 8 example col=6 npixels=7
*
*
* Run: |AB|AB|AB|AB| |AB|AB|AB|AB|
* Run: |AB|AB|AB|AB| |AB|AB|AB|AB|
* GDDRAM row:
* GDDRAM row:
* Byte | 0| 1| 2| 3| 4| 5| 6|
7|
| 0| 1| 2| 3| 4| 5| 6|
* Byte | 0| 1| 2| 3| 4| 5| 6|
| 0| 1| 2| 3| 4| 5| 6|
* Pixel: |--|--|--|
-A|BA|BA|BA|B-|
|--|--|--|AB|AB|AB|A
B
|
* Pixel: |--|--|--|
AB|AB|AB|AB|
|--|--|--|AB|AB|AB|A
-
|
*
*
* start = 3 start = 3
* start = 3 start = 3
* aend = 7 aend = 7
* aend = 6 aend = 6
* end = 8 end = 7
* end = 6 end = 7
*
* example col=7 npixels = 1 example col=7 npixels=2
*
* Run: |A-| |AB|
* GDDRAM row:
* Byte | 0| 1| 2| 3| | 0| 1| 2| 3| 4|
* Pixel: |--|--|--|-A| |--|--|--|-A|B-|
*
*
* start = 3 start = 3
* aend = 4 aend = 4
* end = 4 end = 5
*/
*/
start
=
col
>>
1
;
aend
=
(
col
+
npixels
)
>>
1
;
end
=
(
col
+
npixels
+
1
)
>>
1
;
ritdbg
(
"start: %d aend: %d end: %d
\n
"
,
start
,
aend
,
end
);
/* Copy the run into the framebuffer, handling nibble alignment */
if
((
col
&
1
)
==
0
)
if
((
col
&
1
)
==
0
)
{
{
/* Check for the special case of only 1 pixel being blitted */
/* Check for the special case of only 1 pixel being blitted */
...
@@ -771,7 +764,10 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
...
@@ -771,7 +764,10 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
memcpy
(
&
run
[
start
],
buffer
,
aend
-
start
+
1
);
memcpy
(
&
run
[
start
],
buffer
,
aend
-
start
+
1
);
}
}
/* Handle any final pixel (including the special case where npixels == 1). */
/* An even number of byte-aligned pixel pairs have been written (where
* zero counts as an even number). If npixels was was odd (including
* npixels == 1), then handle the final, byte aligned pixel.
*/
if
(
aend
!=
end
)
if
(
aend
!=
end
)
{
{
...
@@ -782,6 +778,21 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
...
@@ -782,6 +778,21 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
run
[
aend
]
=
(
run
[
aend
]
&
0x0f
)
|
(
buffer
[
aend
-
start
]
&
0xf0
);
run
[
aend
]
=
(
run
[
aend
]
&
0x0f
)
|
(
buffer
[
aend
-
start
]
&
0xf0
);
}
}
}
}
/* CASE 2: First pixel X position is byte aligned
*
* example col=7 npixels = 8 example col=7 npixels=7
*
* Run: |AB|AB|AB|AB| |AB|AB|AB|AB|
* GDDRAM row:
* Byte | 0| 1| 2| 3| 4| 5| 6| 7| | 0| 1| 2| 3| 4| 5| 6|
* Pixel: |--|--|--|-A|BA|BA|BA|B-| |--|--|--|-A|BA|BA|BA|
*
* start = 3 start = 3
* aend = 7 aend = 7
* end = 8 end = 7
*/
else
else
{
{
uint8_t
curr
=
buffer
[
0
];
uint8_t
curr
=
buffer
[
0
];
...
@@ -809,7 +820,10 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
...
@@ -809,7 +820,10 @@ static int rit_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
run
[
i
]
=
(
last
<<
4
)
|
(
curr
>>
4
);
run
[
i
]
=
(
last
<<
4
)
|
(
curr
>>
4
);
}
}
/* Handle any final pixel (including the special case where npixels == 1). */
/* An odd number of unaligned pixel have been written (where npixels
* may have been as small as one). If npixels was was even, then handle
* the final, unaligned pixel.
*/
if
(
aend
!=
end
)
if
(
aend
!=
end
)
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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