|
@@ -0,0 +1,675 @@
|
|
|
+
|
|
|
+
|
|
|
+ This program will horizontally scroll information across the display.
|
|
|
+
|
|
|
+ Written by Ron Lauzon - 2007
|
|
|
+ I release this code into the Public Domain.
|
|
|
+ Use this at your own risk.
|
|
|
+*/
|
|
|
+
|
|
|
+#include <stdio.h>
|
|
|
+#include <time.h>
|
|
|
+#include <string.h>
|
|
|
+#include <sys/types.h>
|
|
|
+#include <sys/stat.h>
|
|
|
+#include <fcntl.h>
|
|
|
+#include <ctype.h>
|
|
|
+#include <stdlib.h>
|
|
|
+#include "fifo.h"
|
|
|
+#include "pert_interf.h"
|
|
|
+
|
|
|
+# define BUF_SIZE 512
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+#define CONFIG_FILE_NAME "./pertd2.conf"
|
|
|
+#else
|
|
|
+#define CONFIG_FILE_NAME "/etc/pertd2.conf"
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+char *command_text[] = {"backlight on",
|
|
|
+ "backlight off",
|
|
|
+ "stop",
|
|
|
+ "line1",
|
|
|
+ "line2",
|
|
|
+ "line3",
|
|
|
+ "line4",
|
|
|
+ "delay time",
|
|
|
+ "char delay",
|
|
|
+ "backlight mgt on",
|
|
|
+ "backlight mgt off",
|
|
|
+ NULL};
|
|
|
+enum command_enum {
|
|
|
+ backlight_on = 0,
|
|
|
+ backlight_off,
|
|
|
+ stop,
|
|
|
+ line1,
|
|
|
+ line2,
|
|
|
+ line3,
|
|
|
+ line4,
|
|
|
+ delay_time_cmd,
|
|
|
+ char_delay_cmd,
|
|
|
+ backlight_mgt_on,
|
|
|
+ backlight_mgt_off,
|
|
|
+ error_cmd=999};
|
|
|
+
|
|
|
+
|
|
|
+char *fifo_name = NULL;
|
|
|
+char *device_name = NULL;
|
|
|
+unsigned int delay_time = 0;
|
|
|
+int backlight_mgt = 0;
|
|
|
+
|
|
|
+
|
|
|
+char *lines[4];
|
|
|
+int pos[4];
|
|
|
+time_t refresh_time[4];
|
|
|
+int timeout[4];
|
|
|
+int backlight_status;
|
|
|
+
|
|
|
+
|
|
|
+ * i.e. it disconnects from the current session so that
|
|
|
+ * it's not automatically killed when the user logs off.
|
|
|
+ */
|
|
|
+int daemon_init() {
|
|
|
+ pid_t pid;
|
|
|
+ FILE *pidfile;
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+ return(0);
|
|
|
+#endif
|
|
|
+
|
|
|
+ if ( (pid=fork()) < 0)
|
|
|
+ return(-1);
|
|
|
+ else if (pid != 0)
|
|
|
+ exit(0);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ setsid();
|
|
|
+
|
|
|
+ return(0);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+int is_numeric(char *buffer) {
|
|
|
+ int i;
|
|
|
+
|
|
|
+
|
|
|
+ for (i=0; i<strlen(buffer); i++) {
|
|
|
+
|
|
|
+ if (!isdigit(buffer[i])) {
|
|
|
+
|
|
|
+ return(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return(1);
|
|
|
+}
|
|
|
+
|
|
|
+int read_config(char *config_file_name) {
|
|
|
+ FILE *config_file;
|
|
|
+ char line[1024];
|
|
|
+ char *parm;
|
|
|
+ char *value;
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("Opening config file %s\n",config_file_name);
|
|
|
+#endif
|
|
|
+
|
|
|
+ char_delay = 1;
|
|
|
+
|
|
|
+
|
|
|
+ if ((config_file = fopen(config_file_name,"r")) != NULL) {
|
|
|
+
|
|
|
+
|
|
|
+ while(fgets(line,1024,config_file) != NULL) {
|
|
|
+
|
|
|
+
|
|
|
+ line[strlen(line)-1] = '\0';
|
|
|
+
|
|
|
+
|
|
|
+ if (line[0] == '#')
|
|
|
+ continue;
|
|
|
+
|
|
|
+ if (strchr(line,'=') == NULL)
|
|
|
+ continue;
|
|
|
+
|
|
|
+
|
|
|
+ value=strchr(line,'=');
|
|
|
+ value[0] = '\0';
|
|
|
+ value++;
|
|
|
+
|
|
|
+
|
|
|
+ if (strcmp(line,"fifo_name") == 0) {
|
|
|
+ fifo_name = (char *)malloc(strlen(value)+1);
|
|
|
+ strcpy(fifo_name,value);
|
|
|
+ }
|
|
|
+ if (strcmp(line,"device") == 0) {
|
|
|
+ device_name = (char *)malloc(strlen(value)+1);
|
|
|
+ strcpy(device_name,value);
|
|
|
+ }
|
|
|
+ if (strcmp(line,"delay_time") == 0) {
|
|
|
+ delay_time=atoi(value);
|
|
|
+ }
|
|
|
+ if (strcmp(line,"char_delay") == 0) {
|
|
|
+ char_delay=atoi(value);
|
|
|
+ }
|
|
|
+ if (strcmp(line,"backlight_mgt") == 0) {
|
|
|
+ backlight_mgt=atoi(value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fclose(config_file);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (fifo_name == NULL) {
|
|
|
+ fifo_name = (char *)malloc(1024);
|
|
|
+ strcpy(fifo_name,"/tmp/pertd2.fifo");
|
|
|
+ }
|
|
|
+ if (device_name == NULL) {
|
|
|
+ device_name = (char *)malloc(1024);
|
|
|
+ strcpy(device_name,"/dev/ttyUSB0");
|
|
|
+ }
|
|
|
+ if (delay_time == 0)
|
|
|
+ delay_time = 500000;
|
|
|
+}
|
|
|
+
|
|
|
+int get_command() {
|
|
|
+ char *command;
|
|
|
+ int i;
|
|
|
+
|
|
|
+ command = read_line();
|
|
|
+ if (command == NULL) {
|
|
|
+ return(error_cmd);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ for(i=0;i<strlen(command);i++)
|
|
|
+ command[i] = tolower(command[i]);
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("Command:%s\n",command);
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+ i = 0;
|
|
|
+ while(command_text[i] != NULL) {
|
|
|
+
|
|
|
+ if (strcmp(command,command_text[i]) == 0) {
|
|
|
+ free(command);
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("Command_num:%d\n",i);
|
|
|
+#endif
|
|
|
+
|
|
|
+ return(i);
|
|
|
+ }
|
|
|
+ i++;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * so the data is invalid. Throw it out. */
|
|
|
+ free(command);
|
|
|
+ return(error_cmd);
|
|
|
+}
|
|
|
+
|
|
|
+int get_timeout() {
|
|
|
+ char *timeout;
|
|
|
+ int i;
|
|
|
+ int int_timeout;
|
|
|
+
|
|
|
+ timeout = read_line();
|
|
|
+ if (timeout == NULL) {
|
|
|
+ return(-1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (!is_numeric(timeout)) {
|
|
|
+
|
|
|
+ free(timeout);
|
|
|
+ return(-1);
|
|
|
+ }
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("Timeout:%s\n",timeout);
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+ int_timeout = atoi(timeout);
|
|
|
+ free(timeout);
|
|
|
+ return(int_timeout);
|
|
|
+}
|
|
|
+
|
|
|
+char *get_line() {
|
|
|
+ char *EOD;
|
|
|
+ char *current_line, *temp;
|
|
|
+ char *line_buffer;
|
|
|
+ int current_length;
|
|
|
+
|
|
|
+
|
|
|
+ EOD = read_line();
|
|
|
+ if (EOD == NULL) {
|
|
|
+ return(NULL);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ current_length = 1;
|
|
|
+ line_buffer = (char *)malloc(current_length);
|
|
|
+ line_buffer[0] = '\0';
|
|
|
+
|
|
|
+
|
|
|
+ current_line = read_line();
|
|
|
+
|
|
|
+
|
|
|
+ * and we didn't run out of fifo data */
|
|
|
+ while ((current_line != NULL)
|
|
|
+ && (strcmp(current_line,EOD) != 0)) {
|
|
|
+
|
|
|
+ if ((strlen(current_line) + strlen(line_buffer)+1) > current_length) {
|
|
|
+
|
|
|
+ temp = line_buffer;
|
|
|
+ line_buffer = (char *)malloc(current_length+BUF_SIZE);
|
|
|
+ memcpy(line_buffer,temp,current_length);
|
|
|
+ current_length += BUF_SIZE;
|
|
|
+ free(temp);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (strlen(line_buffer) > 0)
|
|
|
+ strcat(line_buffer," ");
|
|
|
+ strcat(line_buffer,current_line);
|
|
|
+
|
|
|
+ free(current_line);
|
|
|
+
|
|
|
+ current_line = read_line();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (current_line != NULL)
|
|
|
+ free(current_line);
|
|
|
+ free(EOD);
|
|
|
+ return(line_buffer);
|
|
|
+}
|
|
|
+
|
|
|
+void process_delay_time() {
|
|
|
+ char *cur_line;
|
|
|
+
|
|
|
+
|
|
|
+ cur_line = read_line();
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("Read delay_time:%s\n",cur_line);
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+ if (cur_line == NULL)
|
|
|
+ return;
|
|
|
+ if (strlen(cur_line) == 0)
|
|
|
+ return;
|
|
|
+
|
|
|
+
|
|
|
+ if (is_numeric(cur_line)) {
|
|
|
+ delay_time = atoi(cur_line);
|
|
|
+ free(cur_line);
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("Processed delay_time:%d\n",delay_time);
|
|
|
+#endif
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void process_char_delay() {
|
|
|
+ char *cur_line;
|
|
|
+
|
|
|
+
|
|
|
+ cur_line = read_line();
|
|
|
+
|
|
|
+
|
|
|
+ if (cur_line == NULL)
|
|
|
+ return;
|
|
|
+ if (strlen(cur_line) == 0)
|
|
|
+ return;
|
|
|
+
|
|
|
+
|
|
|
+ if (is_numeric(cur_line)) {
|
|
|
+ char_delay = atoi(cur_line);
|
|
|
+ free(cur_line);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+void process_line(int line_num) {
|
|
|
+ int cur_timeout;
|
|
|
+ char *cur_line;
|
|
|
+ time_t now;
|
|
|
+
|
|
|
+ time(&now);
|
|
|
+ cur_timeout = get_timeout();
|
|
|
+ if (cur_timeout < 0) {
|
|
|
+ cur_timeout = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ cur_line = get_line();
|
|
|
+
|
|
|
+ if (lines[line_num] != NULL)
|
|
|
+ free(lines[line_num]);
|
|
|
+
|
|
|
+ lines[line_num] = cur_line;
|
|
|
+ timeout[line_num] = cur_timeout;
|
|
|
+ refresh_time[line_num] = now;
|
|
|
+}
|
|
|
+
|
|
|
+int data_to_display() {
|
|
|
+ int temp;
|
|
|
+ int i;
|
|
|
+ temp = 0;
|
|
|
+
|
|
|
+
|
|
|
+ for (i=0; i<4; i++) {
|
|
|
+
|
|
|
+ if (lines[i] != NULL) {
|
|
|
+ if (strlen(lines[i]) > 0) {
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+void display_date_time() {
|
|
|
+ time_t now_t;
|
|
|
+ struct tm *now_tm;
|
|
|
+ char line2[PERT_DISPLAY_WIDTH+1], line3[PERT_DISPLAY_WIDTH+1];
|
|
|
+
|
|
|
+
|
|
|
+ now_t = time(NULL);
|
|
|
+
|
|
|
+
|
|
|
+ now_tm = localtime(&now_t);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ strftime(line2,PERT_DISPLAY_WIDTH+1," %a %b %d, %Y ",now_tm);
|
|
|
+
|
|
|
+ strftime(line3,PERT_DISPLAY_WIDTH+1," %T ",now_tm);
|
|
|
+ line2[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+ line3[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("line2= %s\n",line2);
|
|
|
+ printf("line3= %s\n",line3);
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+ wrtln(1,line2);
|
|
|
+ wrtln(2,line3);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+ * when at the end of the data */
|
|
|
+char *fill_line(int lineno,int offset) {
|
|
|
+ static char temp_line[21];
|
|
|
+ int i;
|
|
|
+ int temp_pos;
|
|
|
+
|
|
|
+
|
|
|
+ if (lines[lineno] == NULL) {
|
|
|
+
|
|
|
+ if (lineno == 0) {
|
|
|
+
|
|
|
+ memset(temp_line,' ',PERT_DISPLAY_WIDTH);
|
|
|
+ temp_line[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+ return(temp_line);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ return(fill_line(lineno-1,offset + PERT_DISPLAY_WIDTH));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (strlen(lines[lineno]) == 0) {
|
|
|
+
|
|
|
+ if (lineno == 0) {
|
|
|
+
|
|
|
+ memset(temp_line,' ',PERT_DISPLAY_WIDTH);
|
|
|
+ temp_line[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+ return(temp_line);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ return(fill_line(lineno-1,offset + PERT_DISPLAY_WIDTH));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (strlen(lines[lineno]) < 21) {
|
|
|
+
|
|
|
+ if (offset == 0) {
|
|
|
+
|
|
|
+ strcpy(temp_line,(lines[lineno]));
|
|
|
+ for (i=strlen(lines[lineno]); i<PERT_DISPLAY_WIDTH; i++)
|
|
|
+ temp_line[i] = ' ';
|
|
|
+ temp_line[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+ return(temp_line);
|
|
|
+ } else {
|
|
|
+
|
|
|
+ memset(temp_line,' ',PERT_DISPLAY_WIDTH);
|
|
|
+ temp_line[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+ return(temp_line);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (strlen(lines[lineno]) <= offset) {
|
|
|
+
|
|
|
+ memset(temp_line,' ',PERT_DISPLAY_WIDTH);
|
|
|
+ temp_line[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+ return(temp_line);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ * display PERT_DISPLAY_WIDTH starting at the last position
|
|
|
+ * displayed */
|
|
|
+ temp_pos = pos[lineno] + offset;
|
|
|
+ while (temp_pos > strlen(lines[lineno]))
|
|
|
+ temp_pos = temp_pos - strlen(lines[lineno]);
|
|
|
+ if (temp_pos < 0)
|
|
|
+ temp_pos = 0;
|
|
|
+
|
|
|
+
|
|
|
+ for (i=0; i<PERT_DISPLAY_WIDTH; i++) {
|
|
|
+
|
|
|
+ * start over at the beginning */
|
|
|
+ if (temp_pos >= strlen(lines[lineno]))
|
|
|
+ temp_pos = 0;
|
|
|
+
|
|
|
+ temp_line[i] = lines[lineno][temp_pos];
|
|
|
+ temp_pos++;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ pos[lineno]++;
|
|
|
+
|
|
|
+
|
|
|
+ * start over */
|
|
|
+ if (pos[lineno] >= strlen(lines[lineno]))
|
|
|
+ pos[lineno] = 0;
|
|
|
+
|
|
|
+
|
|
|
+ temp_line[PERT_DISPLAY_WIDTH] = '\0';
|
|
|
+ return(temp_line);
|
|
|
+}
|
|
|
+
|
|
|
+int main(int argc, char *argv[]) {
|
|
|
+ int stop_indicated;
|
|
|
+ int processing_command;
|
|
|
+ int i;
|
|
|
+ time_t now;
|
|
|
+
|
|
|
+
|
|
|
+ if (argc > 1) {
|
|
|
+
|
|
|
+ * using that argument */
|
|
|
+ if (!read_config(argv[1])) {
|
|
|
+
|
|
|
+ read_config(CONFIG_FILE_NAME);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+
|
|
|
+ read_config(CONFIG_FILE_NAME);
|
|
|
+ }
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("Device = %s\n",device_name);
|
|
|
+ printf("Fifo = %s\n",fifo_name);
|
|
|
+ printf("Delay time = %d\n",delay_time);
|
|
|
+ printf("Char Delay time = %d\n",char_delay);
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+ time(&now);
|
|
|
+ for(i=0;i<4;i++) {
|
|
|
+ lines[i] = NULL;
|
|
|
+ refresh_time[i] = now;
|
|
|
+ timeout[i] = 0;
|
|
|
+ pos[i] = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ display_init(device_name);
|
|
|
+
|
|
|
+
|
|
|
+ backlight_status = 1;
|
|
|
+ backlight(1);
|
|
|
+
|
|
|
+
|
|
|
+ if (daemon_init() != 0) {
|
|
|
+ fprintf(stderr,"Failed to go daemon\n");
|
|
|
+ return(1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (!open_fifo(fifo_name)) {
|
|
|
+ fprintf(stderr,"Error creating FIFO: %s\n",fifo_name);
|
|
|
+ return(1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ stop_indicated = 0;
|
|
|
+ while (!stop_indicated) {
|
|
|
+ time(&now);
|
|
|
+
|
|
|
+
|
|
|
+ processing_command = 1;
|
|
|
+ while (processing_command) {
|
|
|
+ switch (get_command()) {
|
|
|
+ case backlight_on:
|
|
|
+ backlight(1);
|
|
|
+ backlight_status = 1;
|
|
|
+ break;
|
|
|
+ case backlight_off:
|
|
|
+ backlight(0);
|
|
|
+ backlight_status = 0;
|
|
|
+ break;
|
|
|
+ case stop:
|
|
|
+ stop_indicated = 1;
|
|
|
+ break;
|
|
|
+ case line1:
|
|
|
+ process_line(0);
|
|
|
+ break;
|
|
|
+ case line2:
|
|
|
+ process_line(1);
|
|
|
+ break;
|
|
|
+ case line3:
|
|
|
+ process_line(2);
|
|
|
+ break;
|
|
|
+ case line4:
|
|
|
+ process_line(3);
|
|
|
+ break;
|
|
|
+ case delay_time_cmd:
|
|
|
+ process_delay_time();
|
|
|
+ break;
|
|
|
+ case char_delay_cmd:
|
|
|
+ process_char_delay();
|
|
|
+ break;
|
|
|
+ case backlight_mgt_on:
|
|
|
+ backlight_mgt = 1;
|
|
|
+ break;
|
|
|
+ case backlight_mgt_off:
|
|
|
+ backlight_mgt = 0;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ processing_command = 0;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+#ifdef DEBUG
|
|
|
+ printf("main:processed command\n");
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+ for(i=0;i<4;i++) {
|
|
|
+
|
|
|
+ if (lines[i] != NULL) {
|
|
|
+
|
|
|
+ if (timeout[i] > 0) {
|
|
|
+
|
|
|
+ if (difftime(now,refresh_time[i]) > timeout[i]) {
|
|
|
+
|
|
|
+ free(lines[i]);
|
|
|
+ lines[i] = NULL;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ wrtln(i,fill_line(i,0));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (!data_to_display()) {
|
|
|
+
|
|
|
+ display_date_time();
|
|
|
+
|
|
|
+
|
|
|
+ * and backight mgt is on,
|
|
|
+ * turn the backlight off */
|
|
|
+ if ((backlight_status == 1)
|
|
|
+ && (backlight_mgt == 1)) {
|
|
|
+ backlight(0);
|
|
|
+ backlight_status=0;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+
|
|
|
+ * If the backlight is off,
|
|
|
+ * and backlight mangement is on,
|
|
|
+ * turn the backlight on */
|
|
|
+ if ((backlight_status == 0)
|
|
|
+ && (backlight_mgt ==1)) {
|
|
|
+ backlight(1);
|
|
|
+ backlight_status=1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ sleep_us(delay_time);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ wrtln(0," ");
|
|
|
+ wrtln(1,"pertd daemon stopped");
|
|
|
+ wrtln(2," ");
|
|
|
+ wrtln(3," ");
|
|
|
+
|
|
|
+
|
|
|
+ display_close();
|
|
|
+
|
|
|
+
|
|
|
+ close_fifo(fifo_name);
|
|
|
+
|
|
|
+ return(0);
|
|
|
+}
|