Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
5ff305e4
Commit
5ff305e4
authored
1 year ago
by
moon2
Committed by
q3k
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
crappy captouch in c
parent
b7e0ec32
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
badge23/captouch.c
+7
-0
7 additions, 0 deletions
badge23/captouch.c
badge23/captouch.h
+2
-0
2 additions, 0 deletions
badge23/captouch.h
badge23/espan.c
+6
-1
6 additions, 1 deletion
badge23/espan.c
with
15 additions
and
1 deletion
badge23/captouch.c
+
7
−
0
View file @
5ff305e4
...
...
@@ -2,6 +2,7 @@
//#include <string.h>
#include
"esp_log.h"
#include
"driver/i2c.h"
#include
<stdint.h>
static
const
char
*
TAG
=
"captouch"
;
...
...
@@ -153,6 +154,12 @@ static void IRAM_ATTR gpio_isr_handler(void* arg)
xQueueSendFromISR
(
gpio_evt_queue
,
&
chip
,
NULL
);
}
void
manual_captouch_readout
(
uint8_t
top
)
{
struct
ad714x_chip
*
chip
=
top
?
(
&
chip_top
)
:
(
&
chip_bot
);
xQueueSendFromISR
(
gpio_evt_queue
,
&
chip
,
NULL
);
}
void
espan_handle_captouch
(
uint16_t
pressed_top
,
uint16_t
pressed_bot
);
static
uint16_t
pressed_top
,
pressed_bot
;
...
...
This diff is collapsed.
Click to expand it.
badge23/captouch.h
+
2
−
0
View file @
5ff305e4
#pragma once
#include
<stdint.h>
void
captouch_init
(
void
);
void
captouch_print_debug_info
(
void
);
void
gpio_event_handler
(
void
*
arg
);
void
manual_captouch_readout
(
uint8_t
top
);
void
captouch_get_cross
(
int
paddle
,
int
*
x
,
int
*
y
);
This diff is collapsed.
Click to expand it.
badge23/espan.c
+
6
−
1
View file @
5ff305e4
...
...
@@ -100,7 +100,7 @@ void os_app_main(void)
audio_init
();
leds_init
();
//display_init();
//
captouch_init();
captouch_init
();
mp_hal_stdout_tx_str
(
"task inits done
\n\r
"
);
//play_bootsound();
...
...
@@ -115,6 +115,11 @@ void os_app_main(void)
int
i
=
0
;
void
*
asdasd
=
&
i
;
while
(
1
)
{
manual_captouch_readout
(
1
);
vTaskDelay
(
10
/
portTICK_PERIOD_MS
);
manual_captouch_readout
(
0
);
vTaskDelay
(
10
/
portTICK_PERIOD_MS
);
continue
;
i
=
(
i
+
1
)
%
10
;
if
(
!
(
i
==
2
||
i
==
8
))
continue
;
...
...
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