g0orx / pihpsdr

Raspberry Pi standalone code for HPSDR (Protocol 1 and Protocol 2)
GNU General Public License v2.0
110 stars 72 forks source link

Error compiling without GPIO #196

Closed yarda closed 3 hours ago

yarda commented 6 hours ago

Due to #195 I tried to compile without GPIO, but it also doesn't work:

gpio.c: In function ‘gpio_cw_sidetone_set’:
gpio.c:1094:12: error: implicit declaration of function ‘gpiod_ctxless_set_value_ext’ [-Wimplicit-function-declaration]
 1094 |     if((rc=gpiod_ctxless_set_value_ext(gpio_device,SIDETONE_GPIO,level,FALSE,consumer,NULL,NULL,0))<0) {
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
gpio.c:1094:40: error: ‘gpio_device’ undeclared (first use in this function)
 1094 |     if((rc=gpiod_ctxless_set_value_ext(gpio_device,SIDETONE_GPIO,level,FALSE,consumer,NULL,NULL,0))<0) {
      |                                        ^~~~~~~~~~~
gpio.c:1094:40: note: each undeclared identifier is reported only once for each function it appears in
gpio.c:1094:78: error: ‘consumer’ undeclared (first use in this function)
 1094 |     if((rc=gpiod_ctxless_set_value_ext(gpio_device,SIDETONE_GPIO,level,FALSE,consumer,NULL,NULL,0))<0) {
      |                                                                              ^~~~~~~~
yarda commented 5 hours ago

It seems it's fixed by 4e17d4c80770a7223c40e5b660532e67454a30d8, it would probably require new release / tag, I hit it with the latest pihpsdr-2.0.8-rc1.