cpu/atmega: fix PWM compilation error with NDEBUG

When NDEBUG macro is defined during compilation, the assert macro produces empty code. The dev parameter is then unused.
This commit is contained in:
Gunar Schorcht 2020-02-03 00:14:32 +01:00
parent f760625cd0
commit 668e05ed4f

View File

@ -60,6 +60,7 @@ static inline unsigned get_prescaler(pwm_t dev, uint32_t *scale)
uint32_t pwm_init(pwm_t dev, pwm_mode_t mode, uint32_t freq, uint16_t res)
{
(void)mode;
/* only left implemented, max resolution 256 */
assert(dev < PWM_NUMOF && mode == PWM_LEFT && res <= 256);
/* resolution != 256 only valid if ch0 not used */