[riot-notifications] [RIOT-OS/RIOT] gnrc/mac : Expose configurations to Kconfig (#14138)

Akshai M (Augustus Diode) notifications at github.com
Mon May 25 19:22:34 CEST 2020


### Contribution description

This PR exposes compile configurations in GNRC: MAC to Kconfig.

### Testing procedure

1. New documentation was built using Doxygen 

The build works fine.

2. Macro was introduced 

```
#define STR(x)   #x
#define SHOW_DEFINE(x) printf("%s=%s\n", #x, STR(x))

```
#### Default State:

##### Firmware Output

RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2020.07-devel-739-g6e24-Kconfig_mac_tests)
CONFIG_GNRC_MAC_RX_QUEUE_SIZE_EXP=(3U)
GNRC_MAC_RX_QUEUE_SIZE=(1 << (3U))
CONFIG_GNRC_MAC_DISPATCH_BUFFER_SIZE_EXP=(3U)
GNRC_MAC_DISPATCH_BUFFER_SIZE=(1 << (3U))
CONFIG_GNRC_MAC_NEIGHBOR_COUNT=4
CONFIG_GNRC_MAC_TX_QUEUE_SIZE_EXP=(3U)
GNRC_MAC_TX_QUEUE_SIZE=4
CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD=CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD
GNRC_MAC_ENABLE_DUTYCYCLE_RECORD=(1U)

#### Usage with menuconfig [default values]

> make menuconfig

##### Firmware Output
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2020.07-devel-739-g6e24-Kconfig_mac_tests)
CONFIG_GNRC_MAC_RX_QUEUE_SIZE_EXP=3
GNRC_MAC_RX_QUEUE_SIZE=(1 << 3)
CONFIG_GNRC_MAC_DISPATCH_BUFFER_SIZE_EXP=3
GNRC_MAC_DISPATCH_BUFFER_SIZE=(1 << 3)
CONFIG_GNRC_MAC_NEIGHBOR_COUNT=8
CONFIG_GNRC_MAC_TX_QUEUE_SIZE_EXP=3
GNRC_MAC_TX_QUEUE_SIZE=(1 << 3)
CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD=CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD
GNRC_MAC_ENABLE_DUTYCYCLE_RECORD=(1U)

#### Usage with menuconfig

> make menuconfig

##### Firmware Output
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2020.07-devel-739-g6e24-Kconfig_mac_tests)
CONFIG_GNRC_MAC_RX_QUEUE_SIZE_EXP=4
GNRC_MAC_RX_QUEUE_SIZE=(1 << 4)
CONFIG_GNRC_MAC_DISPATCH_BUFFER_SIZE_EXP=2
GNRC_MAC_DISPATCH_BUFFER_SIZE=(1 << 2)
CONFIG_GNRC_MAC_NEIGHBOR_COUNT=4
CONFIG_GNRC_MAC_TX_QUEUE_SIZE_EXP=2
GNRC_MAC_TX_QUEUE_SIZE=(1 << 2)
CONFIG_GNRC_MAC_DISABLE_DUTYCYCLE_RECORD=1
GNRC_MAC_ENABLE_DUTYCYCLE_RECORD=(0)

**MACROS were successfully configured.**

### Issues/PRs references

#12888 
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/14138

-- Commit Summary --

  * gnrc/mac : Update documentation
  * gnrc/mac : Configure GNRC_MAC_RX_QUEUE_SIZE with exponent
  * gnrc/mac : Configure GNRC_MAC_DISPATCH_BUFFER_SIZE with exponent
  * gnrc/mac : Move GNRC_MAC_NEIGHBOR_COUNT to 'CONFIG_'
  * gnrc/mac : Configure GNRC_MAC_TX_QUEUE_SIZE with exponent
  * gnrc/mac : Expose to Kconfig
  * tests/unittests/mac : Added check for macro if set via Kconfig
  * gnrc/mac : Update documentation
  * gnrc/mac : Model as bool GNRC_MAC_ENABLE_DUTYCYCLE_RECORD

-- File Changes --

    M sys/include/net/gnrc/mac/internal.h (4)
    M sys/include/net/gnrc/mac/mac.h (80)
    M sys/include/net/gnrc/mac/types.h (26)
    M sys/include/net/gnrc/netif/mac.h (6)
    M sys/net/gnrc/Kconfig (1)
    M sys/net/gnrc/link_layer/gomach/gomach_internal.c (10)
    M sys/net/gnrc/link_layer/lwmac/lwmac.c (2)
    A sys/net/gnrc/link_layer/mac/Kconfig (46)
    M sys/net/gnrc/link_layer/mac/internal.c (16)
    M tests/unittests/tests-gnrc_mac_internal/Makefile.include (4)
    M tests/unittests/tests-gnrc_mac_internal/tests-gnrc_mac_internal.c (8)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/14138.patch
https://github.com/RIOT-OS/RIOT/pull/14138.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/14138
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200525/54ee268f/attachment.htm>


More information about the notifications mailing list