561 snprintf(buf, 39, "Raspberry GPIO %d", i); |
561 snprintf(buf, 39, "Raspberry GPIO %d", i); |
562 ndev->description = xstrcpy(buf); |
562 ndev->description = xstrcpy(buf); |
563 ndev->subdevice = i; |
563 ndev->subdevice = i; |
564 ndev->gpiopin = pin; |
564 ndev->gpiopin = pin; |
565 ndev->timestamp = time(NULL); |
565 ndev->timestamp = time(NULL); |
566 if (i == PANEL_LED) { |
566 if (i == 0) { |
|
567 ndev->direction = DEVDIR_INTERN; |
|
568 ndev->inuse = 1; |
|
569 ndev->comment = xstrcpy((char *)"RS433 Mhz transmitter"); |
|
570 } else if (i == 3) { |
|
571 ndev->direction = DEVDIR_INTERN; |
|
572 ndev->inuse = 1; |
|
573 ndev->comment = xstrcpy((char *)"DHT11 room sensor"); |
|
574 } else if (i == PANEL_LED) { |
567 ndev->direction = DEVDIR_OUT_BIN; |
575 ndev->direction = DEVDIR_OUT_BIN; |
568 ndev->inuse = 1; |
576 ndev->inuse = 1; |
569 ndev->comment = xstrcpy((char *)"Frontpanel LED"); |
577 ndev->comment = xstrcpy((char *)"Frontpanel LED"); |
570 } else if (i == PANEL_ENTER) { |
578 } else if (i == PANEL_ENTER) { |
571 ndev->direction = DEVDIR_IN_BIN; |
579 ndev->direction = DEVDIR_IN_BIN; |