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
Service Desk
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
toerb
flow3r firmware
Commits
4ef3d81d
Commit
4ef3d81d
authored
1 year ago
by
schneider
Committed by
dx
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
espan: captouch: allow for negative capacity offset
parent
b390d098
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/badge23/captouch.c
+7
-4
7 additions, 4 deletions
components/badge23/captouch.c
with
7 additions
and
4 deletions
components/badge23/captouch.c
+
7
−
4
View file @
4ef3d81d
...
...
@@ -21,12 +21,13 @@ static const char *TAG = "captouch";
struct
ad714x_chip
{
uint8_t
addr
;
uint8_t
gpio
;
int
afe_offsets
[
13
];
int
pos_afe_offsets
[
13
];
int
neg_afe_offsets
[
13
];
int
stages
;
};
static
const
struct
ad714x_chip
chip_top
=
{.
addr
=
AD7147_BASE_ADDR
+
1
,
.
gpio
=
48
,
.
afe_offsets
=
{
24
,
12
,
16
,
33
,
30
,
28
,
31
,
27
,
22
,
24
,
18
,
19
,
},
.
stages
=
12
};
static
const
struct
ad714x_chip
chip_bot
=
{.
addr
=
AD7147_BASE_ADDR
,
.
gpio
=
3
,
.
afe_offsets
=
{
3
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
3
},
.
stages
=
10
};
static
const
struct
ad714x_chip
chip_top
=
{.
addr
=
AD7147_BASE_ADDR
+
1
,
.
gpio
=
48
,
.
pos_
afe_offsets
=
{
24
,
12
,
16
,
33
,
30
,
28
,
31
,
27
,
22
,
24
,
18
,
19
,
},
.
stages
=
12
};
static
const
struct
ad714x_chip
chip_bot
=
{.
addr
=
AD7147_BASE_ADDR
,
.
gpio
=
3
,
.
pos_
afe_offsets
=
{
3
,
2
,
1
,
1
,
1
,
1
,
1
,
1
,
2
,
3
},
.
stages
=
10
};
static
esp_err_t
ad714x_i2c_write
(
const
struct
ad714x_chip
*
chip
,
const
uint16_t
reg
,
const
uint16_t
data
)
{
...
...
@@ -219,7 +220,9 @@ static void captouch_init_chip(const struct ad714x_chip* chip, const struct ad71
struct
ad7147_stage_config
stage_config
;
stage_config
=
ad714x_default_config
();
stage_config
.
cinX_connection_setup
[
i
]
=
CIN_CDC_POS
;
stage_config
.
pos_afe_offset
=
chip
->
afe_offsets
[
i
];
stage_config
.
pos_afe_offset
=
chip
->
pos_afe_offsets
[
i
];
stage_config
.
neg_afe_offset
=
chip
->
neg_afe_offsets
[
i
];
stage_config
.
neg_afe_offset_swap
=
1
;
ad714x_set_stage_config
(
chip
,
i
,
&
stage_config
);
}
...
...
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