mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
driver: rename spark_led to simple_display
this code can actually drive all simple one-line displays with minor changes, so rename the source file.
This commit is contained in:
@@ -57,11 +57,11 @@ endif
|
|||||||
|
|
||||||
if BOXTYPE_SPARK
|
if BOXTYPE_SPARK
|
||||||
libneutrino_driver_a_SOURCES += \
|
libneutrino_driver_a_SOURCES += \
|
||||||
spark_led.cpp
|
simple_display.cpp
|
||||||
endif
|
endif
|
||||||
if BOXTYPE_AZBOX
|
if BOXTYPE_AZBOX
|
||||||
libneutrino_driver_a_SOURCES += \
|
libneutrino_driver_a_SOURCES += \
|
||||||
spark_led.cpp
|
simple_display.cpp
|
||||||
endif
|
endif
|
||||||
if USE_STB_HAL
|
if USE_STB_HAL
|
||||||
INCLUDES += \
|
INCLUDES += \
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Routines to drive the SPARK boxes' 4 digit LED display
|
Routines to drive simple one-line text or SPARK's 4 digit LED display
|
||||||
|
|
||||||
(C) 2012 Stefan Seyfried
|
(C) 2012 Stefan Seyfried
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ static inline int dev_open()
|
|||||||
{
|
{
|
||||||
int fd = open("/dev/vfd", O_RDWR);
|
int fd = open("/dev/vfd", O_RDWR);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
fprintf(stderr, "[neutrino] spark_led: open /dev/vfd: %m\n");
|
fprintf(stderr, "[neutrino] simple_display: open " DISPLAY_DEV ": %m\n");
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ static void display(const char *s, bool update_timestamp = true)
|
|||||||
int len = strlen(s);
|
int len = strlen(s);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return;
|
return;
|
||||||
printf("spark_led:%s '%s'\n", __func__, s);
|
printf("%s '%s'\n", __func__, s);
|
||||||
write(fd, s, len);
|
write(fd, s, len);
|
||||||
close(fd);
|
close(fd);
|
||||||
if (update_timestamp)
|
if (update_timestamp)
|
||||||
@@ -131,7 +131,7 @@ void CLCD::setled(int red, int green)
|
|||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
printf("spark_led:%s red:%d green:%d\n", __func__, red, green);
|
printf("%s red:%d green:%d\n", __func__, red, green);
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
@@ -140,7 +140,7 @@ printf("spark_led:%s red:%d green:%d\n", __func__, red, green);
|
|||||||
d.u.led.led_nr = i;
|
d.u.led.led_nr = i;
|
||||||
d.u.led.on = leds[i];
|
d.u.led.on = leds[i];
|
||||||
if (ioctl(fd, VFDSETLED, &d) < 0)
|
if (ioctl(fd, VFDSETLED, &d) < 0)
|
||||||
fprintf(stderr, "[neutrino] spark_led setled VFDSETLED: %m\n");
|
fprintf(stderr, "[neutrino] %s setled VFDSETLED: %m\n", __func__);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,6 @@ void CLCD::showAudioProgress(const char, bool)
|
|||||||
void CLCD::setMode(const MODES m, const char * const)
|
void CLCD::setMode(const MODES m, const char * const)
|
||||||
{
|
{
|
||||||
mode = m;
|
mode = m;
|
||||||
printf("spark_led:%s %d\n", __func__, (int)m);
|
|
||||||
|
|
||||||
switch (m) {
|
switch (m) {
|
||||||
case MODE_TVRADIO:
|
case MODE_TVRADIO:
|
||||||
@@ -265,7 +264,6 @@ printf("spark_led:%s %d\n", __func__, (int)m);
|
|||||||
showclock = true;
|
showclock = true;
|
||||||
showTime();
|
showTime();
|
||||||
}
|
}
|
||||||
printf("spark_led:%s %d end\n", __func__, (int)m);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLCD::setBrightness(int)
|
void CLCD::setBrightness(int)
|
Reference in New Issue
Block a user