]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Fix for setting CW side tone on GPIO line
authorDL1YCF <dl1ycf@darc.de>
Thu, 20 May 2021 15:20:31 +0000 (17:20 +0200)
committerDL1YCF <dl1ycf@darc.de>
Thu, 20 May 2021 15:20:31 +0000 (17:20 +0200)
gpio.c

diff --git a/gpio.c b/gpio.c
index 2ef989f7888cdfb75b9a7443a1ece7c714bf772f..c658c0654713f013ee28fdf76f093f9a99eb6cc9 100644 (file)
--- a/gpio.c
+++ b/gpio.c
@@ -518,7 +518,7 @@ static void process_edge(int offset,int value) {
       keyer_event(1, CW_ACTIVE_LOW ? (value==PRESSED) : value);
       found=TRUE;
     } else if(offset==CWR_BUTTON) {
-      keyer_event(1, CW_ACTIVE_LOW ? (value==PRESSED) : value);
+      keyer_event(2, CW_ACTIVE_LOW ? (value==PRESSED) : value);
       found=TRUE;
     }
   }
@@ -1084,21 +1084,13 @@ void gpio_cw_sidetone_set(int level) {
   int rc;
 #ifdef GPIO
   if (ENABLE_GPIO_SIDETONE) {
-    if((rc=gpiod_ctxless_set_value_ext(gpio_device,SIDETONE_GPIO,level,FALSE,consumer,NULL,NULL,0))<0) {
+    if((rc=gpiod_ctxless_set_value(gpio_device,SIDETONE_GPIO,level,FALSE,consumer,NULL,NULL))<0) {
       g_print("%s: err=%d\n",__FUNCTION__,rc);
     }
   }
 #endif
 }
 
-int  gpio_left_cw_key() {
-  return 0;
-}
-
-int  gpio_right_cw_key() {
-  return 0;
-}
-
 int  gpio_cw_sidetone_enabled() {
   return ENABLE_GPIO_SIDETONE;
 }