StefanBruens / ESP8266_new_pwm

This is a drop-in replacement for the ESP8266 SDK PWM
GNU General Public License v2.0
196 stars 46 forks source link

error: invalid conversion from 'void*' to 'gpio_regs*' #10

Closed ludekvodicka closed 7 years ago

ludekvodicka commented 7 years ago

Hi,

I'm testing your library but unfortunately I'm not able to get it work.

sketch\pwm.c:96:51: error: invalid conversion from 'void*' to 'gpio_regs*' [-fpermissive]
static struct gpio_regs* gpio = (void*)(0x60000300);

sketch\pwm.c:110:53: error: invalid conversion from 'void*' to 'timer_regs*' [-fpermissive]
static struct timer_regs* timer = (void*)(0x60000600);

The problem seems to be in casting constant to pointer to struct.

StefanBruens commented 7 years ago

Fixed, thanks for pointing this out.