Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ch32v003fun
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Andreas Horn
ch32v003fun
Commits
d408ebe4
Commit
d408ebe4
authored
2 years ago
by
Eric Brombaugh
Browse files
Options
Downloads
Plain Diff
Get synced
Merge branch 'master' of github.com:emeb/ch32v003fun
parents
3236aaf9
279fb15d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/debugprintfdemo/debugprintfdemo.c
+0
-1
0 additions, 1 deletion
examples/debugprintfdemo/debugprintfdemo.c
examples/ws2812bdemo/ws2812bdemo.c
+2
-2
2 additions, 2 deletions
examples/ws2812bdemo/ws2812bdemo.c
minichlink/pgm-wch-linke.c
+2
-1
2 additions, 1 deletion
minichlink/pgm-wch-linke.c
with
4 additions
and
4 deletions
examples/debugprintfdemo/debugprintfdemo.c
+
0
−
1
View file @
d408ebe4
...
...
@@ -34,7 +34,6 @@ int main()
GPIOD
->
BSHR
=
(
1
<<
16
)
|
(
1
<<
(
16
+
4
));
// Turn off GPIODs
GPIOC
->
BSHR
=
(
1
<<
16
);
printf
(
"-%lu
\n
"
,
count
++
);
count
++
;
//_write( 0, "xxxxxxx", 7 );
}
}
...
...
This diff is collapsed.
Click to expand it.
examples/ws2812bdemo/ws2812bdemo.c
+
2
−
2
View file @
d408ebe4
...
...
@@ -25,8 +25,8 @@ uint32_t WS2812BLEDCallback( int ledno )
uint8_t
index
=
(
phases
[
ledno
])
>>
8
;
uint8_t
rsbase
=
sintable
[
index
];
uint8_t
rs
=
rsbase
>>
3
;
uint32_t
fire
=
(
huetable
[(
rs
+
190
)
&
0xff
]
<<
16
)
|
(
huetable
[(
rs
+
30
)
&
0xff
])
|
(
huetable
[(
rs
+
0
)]
<<
8
);
uint32_t
ice
=
0x
f
f0000
|
((
rsbase
)
<<
8
)
|
((
rsbase
));
uint32_t
fire
=
(
huetable
[(
rs
+
190
)
&
0xff
]
<<
16
)
|
(
huetable
[(
rs
+
30
)
&
0xff
])
|
(
(
huetable
[(
rs
+
0
)]
>>
1
)
<<
8
);
uint32_t
ice
=
0x
7
f0000
|
((
rsbase
>>
1
)
<<
8
)
|
((
rsbase
>>
1
));
// Because this chip doesn't natively support multiplies, we are going to avoid tweening of 1..254.
return
TweenHexColors
(
fire
,
ice
,
((
tween
+
ledno
)
>
0
)
?
255
:
0
);
// Where "tween" is a value from 0 ... 255
...
...
This diff is collapsed.
Click to expand it.
minichlink/pgm-wch-linke.c
+
2
−
1
View file @
d408ebe4
...
...
@@ -193,9 +193,10 @@ printf( " 5: %d\n", bOn );
return
0
;
}
static
int
LEUnbrick
(
void
*
d
ev
)
static
int
LEUnbrick
(
void
*
d
)
{
printf
(
"Sending unbrick
\n
"
);
libusb_device_handle
*
dev
=
((
struct
LinkEProgrammerStruct
*
)
d
)
->
devh
;
wch_link_command
(
(
libusb_device_handle
*
)
dev
,
"
\x81\x0d\x01\x0f\x09
"
,
5
,
0
,
0
,
0
);
printf
(
"Done unbrick
\n
"
);
return
0
;
...
...
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