RPi Locator and Display Services
skn_rpi_helpers.h
Go to the documentation of this file.
1 /*
2  * skn_rpi_helpers.h
3 */
4 
5 #ifndef SKN_RPI_HELPERS_H__
6 #define SKN_RPI_HELPERS_H__
7 
8 #include "skn_common_headers.h"
9 
10 #include <sys/utsname.h>
11 
12 #include <wiringPi.h>
13 #include <pcf8574.h>
14 #include <mcp23008.h>
15 #include <mcp23017.h>
16 #include <wiringSerial.h> // http://wiringpi.com/reference/serial-library/
17 #include <lcd.h>
18 
19 
20 /*
21  * Global Defines */
22 extern int gd_i_rows;
23 extern int gd_i_cols;
24 extern int gd_i_i2c_address;
25 extern char *gd_pch_serial_port;
26 extern char *gd_pch_device_name;
28 
29 /*
30  * Display Manager Routines */
36 extern int skn_display_manager_do_work(char * client_request_message);
37 extern PDisplayLine skn_display_manager_add_line(PDisplayManager pdmx, char * client_request_message);
38 extern int skn_scroller_scroll_lines(PDisplayLine pdl, int lcd_handle, int line);
39 extern char * skn_scroller_pad_right(char *buffer);
40 extern char * skn_scroller_wrap_blanks(char *buffer);
41 
42 /*
43  * Display Manager Communications Routines */
44 extern int skn_signal_manager_startup(pthread_t *psig_thread, sigset_t *psignal_set, long *l_thread_complete);
45 extern int skn_signal_manager_shutdown(pthread_t sig_thread, sigset_t *psignal_set, long *l_thread_complete);
46 
47 
48 /* WiringPi LCD Interfaces
49 */
50 extern void skn_device_manager_backlight(int af_backlight, int state);
51 extern int skn_device_manager_LCD_setup (PDisplayManager pdm, char *device_name);
53 
54 /* General Utilities
55 */
56 extern int skn_handle_display_command_line(int argc, char **argv);
57 
58 /* Scrolling Display Info Messages
59 */
60 extern int generate_rpi_model_info(char *msg);
61 extern int generate_cpu_temps_info(char *msg);
62 
63 #endif // SKN_RPI_HELPERS_H__
char * gd_pch_device_name
char * skn_scroller_wrap_blanks(char *buffer)
int skn_signal_manager_shutdown(pthread_t sig_thread, sigset_t *psignal_set, long *l_thread_complete)
PDisplayManager gp_structure_pdm
int generate_cpu_temps_info(char *msg)
char * skn_scroller_pad_right(char *buffer)
int gd_i_i2c_address
PDisplayLine skn_display_manager_add_line(PDisplayManager pdmx, char *client_request_message)
int skn_display_manager_do_work(char *client_request_message)
PDisplayManager skn_get_display_manager_ref()
PLCDDevice skn_device_manager_MCP23017(PDisplayManager pdm)
int gd_i_cols
int generate_rpi_model_info(char *msg)
char * gd_pch_serial_port
int skn_signal_manager_startup(pthread_t *psig_thread, sigset_t *psignal_set, long *l_thread_complete)
int skn_device_manager_LCD_setup(PDisplayManager pdm, char *device_name)
PLCDDevice skn_device_manager_PCF8574(PDisplayManager pdm)
PLCDDevice skn_device_manager_MCP23008(PDisplayManager pdm)
int skn_handle_display_command_line(int argc, char **argv)
int gd_i_rows
PLCDDevice skn_device_manager_SerialPort(PDisplayManager pdm)
int skn_device_manager_LCD_shutdown(PDisplayManager pdm)
void skn_device_manager_backlight(int af_backlight, int state)
int skn_scroller_scroll_lines(PDisplayLine pdl, int lcd_handle, int line)