diff options
Diffstat (limited to 'response.c')
-rw-r--r-- | response.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,7 +1,9 @@ #include "response.h" #include "socket-common.h" +#include "i2c.h" #include <string.h> #include <stdlib.h> +#include <glib.h> //RESPONSE related functions from the server @@ -104,9 +106,12 @@ void responseCb(gpointer instance, GObject *arg1, gpointer user_data) // remove leading and trailing whitespace g_strstrip (str); + I2C_Write (0x3b, 0xff); + guchar status = I2C_Read (0x3b); + // dummy response function gchar* upper = g_ascii_strup(str, len); - gchar *out_string = g_strdup_printf("%s\n%s\n%s\n",upper,upper,upper); + gchar *out_string = g_strdup_printf("%s\n%s\n%s\n%d\n",upper,upper,upper,status); gssize out_len = strlen (out_string); //send response back to client |