1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
17830: periph/timer: fix Kconfig menu title r=aabadie a=gschorcht

### Contribution description

This PR is a very small fix of inconsistent peripheral driver entry in `Kconfig` for `periph/timer`.

In Kconfig menu `(Top) → Drivers → Peripherals drivers` all entries start with the peripheral name in alphabetical order with only one exception, the timer entry. This entry is called `Configure timer peripheral driver`:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] UART peripheral driver  --->
[*] Configure timer peripheral driver  --->
```
This is confusing and doesn't help to find the right entry. This PR
1. changes the entry to `Timer peripheral driver` and
2. corrects the alphabetical order.

### Testing procedure

Use command
```
TEST_KCONFIG=1 make -C tests/periph_timer menuconfig
```
and check the output. in menu `(Top) → Drivers → Peripherals drivers`. It should be with this PR:
```
[ ] CPU unique ID
[ ] EEPROM peripheral driver
[ ] Flashpage peripheral driver  ----
[*] GPIO peripheral driver  --->
[ ] HWRNG peripheral driver
[ ] PWM peripheral driver
[*] Power Management (PM) peripheral driver
[*]     Auto initialize Power Management (PM) peripheral
[ ] Quadrature Decoder (QDEC) peripheral driver
[ ] RTC peripheral driver  ----
[ ] SPI peripheral driver  ----
[*] Timer peripheral driver  --->
[*] UART peripheral driver  --->
```
### Issues/PRs references


19635: drivers/mrf24j40: cleanup function r=aabadie a=maribu

### Contribution description

`_set_csma_params()` spends some time to prepare a value in `uint8_t tmp`, which then is never used. Likely this is a leftover of moving code to `mrf24j40_set_csma_max_retries()`. This drops the leftover code.


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
This commit is contained in:
bors[bot] 2023-05-20 18:43:44 +00:00 committed by GitHub
commit 8fc1187278
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 19 deletions

View File

@ -265,19 +265,12 @@ static int _config_phy(ieee802154_dev_t *hal, const ieee802154_phy_conf_t *conf)
static int _set_csma_params(ieee802154_dev_t *hal, const ieee802154_csma_be_t *bd, int8_t retries)
{
mrf24j40_t *dev = hal->priv;
uint8_t tmp;
if (bd->min > MRF24J40_MAX_MINBE) {
return -EINVAL;
}
tmp = mrf24j40_reg_read_short(dev, MRF24J40_REG_TXMCR) & ~MRF24J40_TXMCR_MACMINBE;
if (retries >= 0) {
tmp |= bd->min << MRF24J40_TXMCR_MACMINBE_SHIFT;
}
/* This radio ignores max_be */
mrf24j40_set_csma_max_retries(dev, retries);
return 0;
}

View File

@ -90,16 +90,6 @@ config MODULE_PERIPH_INIT_HWRNG
rsource "Kconfig.i2c"
config MODULE_PERIPH_PWM
bool "PWM peripheral driver"
depends on HAS_PERIPH_PWM
select MODULE_PERIPH_COMMON
config MODULE_PERIPH_INIT_PWM
bool "Auto initialize PWM peripheral"
default y if MODULE_PERIPH_INIT
depends on MODULE_PERIPH_PWM
config MODULE_PERIPH_PM
bool "Power Management (PM) peripheral driver"
default y
@ -111,6 +101,16 @@ config MODULE_PERIPH_INIT_PM
default y if MODULE_PERIPH_INIT
depends on MODULE_PERIPH_PM
config MODULE_PERIPH_PWM
bool "PWM peripheral driver"
depends on HAS_PERIPH_PWM
select MODULE_PERIPH_COMMON
config MODULE_PERIPH_INIT_PWM
bool "Auto initialize PWM peripheral"
default y if MODULE_PERIPH_INIT
depends on MODULE_PERIPH_PWM
config MODULE_PERIPH_QDEC
bool "Quadrature Decoder (QDEC) peripheral driver"
depends on HAS_PERIPH_QDEC
@ -155,6 +155,7 @@ config MODULE_PERIPH_INIT_TEMPERATURE
default y if MODULE_PERIPH_INIT
depends on MODULE_PERIPH_TEMPERATURE
rsource "Kconfig.timer"
rsource "Kconfig.uart"
rsource "Kconfig.usbdev"
@ -166,6 +167,5 @@ config HAVE_SHARED_PERIPH_RTT_PERIPH_RTC
The periph_rtc module or the periph_rtt module share hardware, thus,
only one can be selected.
rsource "Kconfig.timer"
rsource "Kconfig.vbat"
rsource "Kconfig.wdt"

View File

@ -7,7 +7,7 @@
if TEST_KCONFIG
menuconfig MODULE_PERIPH_TIMER
bool "Configure timer peripheral driver"
bool "Timer peripheral driver"
depends on HAS_PERIPH_TIMER
select MODULE_PERIPH_COMMON