-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers: Modification of IFX ADC driver to function with new platform
- Modification of IFX drivers for ADC functionality of new platform cyw920829m2evk_02 - Addition of configuration files to relevant sample/test for cyw920829m2evk_02 Signed-off-by: McAtee Maxwell (CSS ICW SW MTO INT 2) <Maxwell.McAtee@infineon.com>
- Loading branch information
1 parent
54733aa
commit 2dfd7ab
Showing
9 changed files
with
179 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,6 @@ supported: | |
- uart | ||
- clock_control | ||
- bluetooth | ||
- adc | ||
|
||
vendor: infineon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
samples/drivers/adc/adc_dt/boards/cyw920829m2evk_02.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or | ||
* an affiliate of Cypress Semiconductor Corporation | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
/ { | ||
zephyr,user { | ||
io-channels = <&adc0 4>, <&adc0 5>, <&adc0 6>, <&adc0 7>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@4 { | ||
reg = <4>; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,resolution = <12>; | ||
zephyr,input-positive = <4>; /* P3.4 */ | ||
}; | ||
|
||
channel@5 { | ||
reg = <5>; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,resolution = <12>; | ||
zephyr,input-positive = <5>; /* P3.5 */ | ||
}; | ||
|
||
channel@6 { | ||
reg = <6>; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,resolution = <12>; | ||
zephyr,input-positive = <6>; /* P3.6 */ | ||
}; | ||
|
||
channel@7 { | ||
reg = <7>; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,resolution = <12>; | ||
zephyr,input-positive = <7>; /* P3.7 */ | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_TEST_USERSPACE=n |
38 changes: 38 additions & 0 deletions
38
tests/drivers/adc/adc_api/boards/cyw920829m2evk_02.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2024 Cypress Semiconductor Corporation (an Infineon company) or | ||
* an affiliate of Cypress Semiconductor Corporation | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
/ { | ||
zephyr,user { | ||
io-channels = <&adc0 4>, <&adc0 5>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@4 { | ||
reg = <4>; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,resolution = <12>; | ||
zephyr,input-positive = <4>; /* P3.4 */ | ||
}; | ||
|
||
channel@5 { | ||
reg = <5>; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,resolution = <12>; | ||
zephyr,input-positive = <5>; /* P3.5 */ | ||
}; | ||
}; |