mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-23 19:21:59 +03:00
Fixed incorrect usage of memset() in PWM code which leads to incomplete initialization of struct. Thanks to GCC warning -Wsizeof-pointer-memaccess.
This commit is contained in:
committed by
Ivan Grokhotkov
parent
a444898900
commit
9791a48d4a
@ -187,7 +187,7 @@ extern void __analogWrite(uint8_t pin, int value)
|
|||||||
}
|
}
|
||||||
if((pwm_mask & (1 << pin)) == 0) {
|
if((pwm_mask & (1 << pin)) == 0) {
|
||||||
if(pwm_mask == 0) {
|
if(pwm_mask == 0) {
|
||||||
memset(&_pwm_isr_data, 0, sizeof(struct pwm_isr_data*));
|
memset(&_pwm_isr_data, 0, sizeof(_pwm_isr_data));
|
||||||
start_timer = true;
|
start_timer = true;
|
||||||
}
|
}
|
||||||
pinMode(pin, OUTPUT);
|
pinMode(pin, OUTPUT);
|
||||||
|
Reference in New Issue
Block a user