1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 14:33:52 +01:00

tests/periph_pwm: fix not needed cast

This commit is contained in:
Alexandre Abadie 2019-09-20 08:59:43 +02:00
parent 8c94a16032
commit f6dc8a3ea8
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -46,7 +46,7 @@ static uint32_t initiated;
static unsigned _get_dev(const char *dev_str)
{
unsigned dev = (unsigned)atoi(dev_str);
unsigned dev = atoi(dev_str);
if (dev >= PWM_NUMOF) {
printf("Error: device PWM_DEV(%u) is unknown\n", dev);
return UINT_MAX;
@ -123,7 +123,7 @@ static int _set(int argc, char**argv)
return 1;
}
uint8_t chan = (uint8_t)atoi(argv[2]);
uint8_t chan = atoi(argv[2]);
if (chan >= pwm_channels(PWM_DEV(dev))) {
printf("Error: channel %d is unknown.\n", chan);
return 1;