Skip to content

Conversation

@mstasiaknordic
Copy link
Contributor

Added set of analog pins for nRF54L20 SAADC, COMP and LPCOMP.

@decsny
Copy link
Member

decsny commented May 7, 2025

why is nxp platforms added by the bot?

@decsny decsny removed the platform: NXP Drivers NXP Semiconductors, drivers label May 7, 2025
@github-actions github-actions bot added the platform: NXP Drivers NXP Semiconductors, drivers label May 8, 2025
Copy link
Contributor

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@bjarki-andreasen bjarki-andreasen removed the platform: NXP Drivers NXP Semiconductors, drivers label May 8, 2025
anangl
anangl previously approved these changes May 8, 2025
@mstasiaknordic mstasiaknordic dismissed stale reviews from anangl and bjarki-andreasen via 2dad686 May 9, 2025 06:21
@github-actions github-actions bot added the platform: NXP Drivers NXP Semiconductors, drivers label May 9, 2025
@mstasiaknordic
Copy link
Contributor Author

mstasiaknordic commented May 9, 2025

@bjarki-andreasen I moved the array of analog pins to common file. Since the comparator can be used only as either COMP or LPCOMP at the same time, this should not cause any problems. Please take a look


#ifndef ZEPHYR_DRIVERS_COMPARATOR_NRF_COMMON_H_
#define ZEPHYR_DRIVERS_COMPARATOR_NRF_COMMON_H_

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please #include <nrfx.h> here, otherwise we need to rely on include order to ensure NRF_PIN_PORT_TO_PIN_NUMBER is defined :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# SPDX-License-Identifier: Apache-2.0

config TEST_COMP_SE_PSEL_AIN_INDEX
int "Index od analog input for SE psel."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The typos here ("od") could also be corrected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@bjarki-andreasen bjarki-andreasen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Added set of analog pins for nRF54L20 SAADC.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Added set of analog pins for nRF54L20 COMP and LPCOMP.
Moved the array of analong pins for both comparator
variants to avoid code duplication.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
Moved index of analog input used in test from source
code to Kconfig option to simplify adding new targets.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
@sonarqubecloud
Copy link

@kartben kartben merged commit a397a7e into zephyrproject-rtos:main May 13, 2025
26 checks passed
@mstasiaknordic mstasiaknordic deleted the nrf54l20_ain branch May 20, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ADC Analog-to-Digital Converter (ADC) area: Comparator platform: nRF Nordic nRFx platform: NXP Drivers NXP Semiconductors, drivers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants