Skip to content

drivers/at : Expose Configurations to Kconfig #14019

Merged
leandrolanzieri merged 3 commits intoRIOT-OS:masterfrom
akshaim:Kconfig_at
Jun 17, 2020
Merged

drivers/at : Expose Configurations to Kconfig #14019
leandrolanzieri merged 3 commits intoRIOT-OS:masterfrom
akshaim:Kconfig_at

Conversation

@akshaim
Copy link
Copy Markdown
Member

@akshaim akshaim commented May 5, 2020

Contribution description

This PR exposes compile configurations in AT Device driver to Kconfig.

Attention : AT_SEND_ECHO is expected to be deprecated and CONFIG_AT_SEND_SKIP_ECHO
introduced. Macro to be removed after 2021.01 release.

Testing procedure

  1. New documentation was built using doxygen

The build worked fine.

  1. New macro was introduced in tests/driver_at/main.c for testing.
#define STR(x)   #x
#define SHOW_DEFINE(x) printf("%s=%s\n", #x, STR(x))

Firmware was uploaded to FIT IoT Lab test bed.

Default State:

Firmware Output

main(): This is RIOT! (Version: 2020.07-devel-386-ge9126a-Kconfig_at_tests)
CONFIG_AT_SEND_EOL="\r"
CONFIG_AT_SEND_SKIP_ECHO=
AT_SEND_ECHO=1
CONFIG_AT_RECV_OK="OK"
CONFIG_AT_RECV_ERROR="ERROR"
AT_BUF_SIZE=(1<<(7))
AT command test app

Usage with CFLAGS

/tests/driver_at/Makefile

CFLAGS += -DCONFIG_AT_SEND_EOL_UNIX
CFLAGS += -DCONFIG_AT_SEND_SKIP_ECHO
CFLAGS += -DCONFIG_AT_RECV_OK=""DONE""
CFLAGS += -DCONFIG_AT_RECV_ERROR=""EXIT""

Firmware Output

main(): This is RIOT! (Version: 2020.07-devel-386-ge9126a-Kconfig_at_tests)
CONFIG_AT_SEND_EOL="\r"
CONFIG_AT_SEND_SKIP_ECHO=
AT_SEND_ECHO=1
CONFIG_AT_RECV_OK="OK"
CONFIG_AT_RECV_ERROR="ERROR"
AT command test app

Usage with Kconfig

/tests/driver_at/

make menuconfig

Firmware Output

main(): This is RIOT! (Version: 2020.07-devel-557-g871cb-Kconfig_at_tests)
CONFIG_AT_SEND_EOL="\r"
CONFIG_AT_SEND_SKIP_ECHO=
AT_SEND_ECHO=1
CONFIG_AT_RECV_OK="OK"
CONFIG_AT_RECV_ERROR="ERROR"
AT_BUF_SIZE=(1<<5)
AT command test app

Issues/PRs references

#12888
@leandrolanzieri

@leandrolanzieri leandrolanzieri added Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration Type: new feature The issue requests / The PR implemements a new feature for RIOT labels May 7, 2020
@leandrolanzieri leandrolanzieri added this to the Release 2020.07 milestone May 7, 2020
@akshaim
Copy link
Copy Markdown
Member Author

akshaim commented Jun 9, 2020

@leandrolanzieri Ping.

@leandrolanzieri
Copy link
Copy Markdown
Contributor

Please squash

@akshaim akshaim force-pushed the Kconfig_at branch 3 times, most recently from 2759b82 to 5286cc2 Compare June 16, 2020 15:12
@akshaim
Copy link
Copy Markdown
Member Author

akshaim commented Jun 16, 2020

Please squash

Done. Retained the #ifndef guards for AT_BUF_SIZE

@leandrolanzieri leandrolanzieri added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Jun 17, 2020
akshaim added 3 commits June 17, 2020 14:52
Inverse logic for AT_SEND_ECHO
Add CONFIG_ prefix to AT_SEND_EOL,  AT_SEND_SKIP_ECHO,
CONFIG_AT_RECV_OK, CONFIG_AT_RECV_ERROR
Expose configurations to Kconfig:
Model choice for CONFIG_AT_SEND_EOL
Allow value to be configured as exponent for AT_BUF_SIZE
Copy link
Copy Markdown
Contributor

@leandrolanzieri leandrolanzieri left a comment

Choose a reason for hiding this comment

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

ACK.

@leandrolanzieri leandrolanzieri merged commit 7201fdf into RIOT-OS:master Jun 17, 2020
@akshaim
Copy link
Copy Markdown
Member Author

akshaim commented Jun 17, 2020

ACK.

Thanks for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants