summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-16 12:27:50 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2012-08-16 12:27:50 -0400
commite94427e2d85dfc409a4f89c263d727dedcdb3a52 (patch)
treee91125a04914344753f86b3d3ddfce9b0740f902 /parser.c
parentd7ab57c08b3fed543492cd258c36996d3c5d59b3 (diff)
put flash functions in separate files
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/parser.c b/parser.c
index 528a052..40a6d74 100644
--- a/parser.c
+++ b/parser.c
@@ -10,6 +10,7 @@ END DESCRIPTION **********************************************************/
#include "parser.h"
+#include "flash.h"
#include <glib/gprintf.h>
//STATICS
@@ -902,7 +903,7 @@ static int Go_Str_eprom_47(gchar** response, int channel, char *loc_string,char
*(char *)(&globals.Flash.flash_start + eprom_loc+i)=store_string[i];
}
*(char *)(&globals.Flash.flash_start + eprom_loc + i)=(char) 0; /* end of string */
- writeUserBlock(eprom_loc, strlen(store_string)+1);
+ writeUserBlock(&globals.Flash, eprom_loc, strlen(store_string)+1);
return OK;
} else {
return OutOfRange;
@@ -937,7 +938,7 @@ static int Go_int_eprom_48(gchar** response, int channel, char *loc_string,char
case command_param_units:
the_number=(short) atoi(store_string);
*(short *)(&globals.Flash.flash_start + eprom_loc) = the_number;
- writeUserBlock(eprom_loc, sizeof (the_number));
+ writeUserBlock(&globals.Flash, eprom_loc, sizeof (the_number));
return OK;
break;
@@ -970,7 +971,7 @@ static int Go_Float_eprom51(gchar** response, int channel, char *loc_string,char
case command_param_units:
the_number=atof(store_string);
*(float *)(&globals.Flash.flash_start + eprom_loc)=the_number;
- writeUserBlock(eprom_loc, sizeof(the_number));
+ writeUserBlock(&globals.Flash, eprom_loc, sizeof(the_number));
return OK;
break;
@@ -1003,7 +1004,7 @@ static int Go_char_eprom_70(gchar** response, int channel, char *loc_string,char
case command_param_units:
the_number=(char) atoi(store_string);
*(char *)(&globals.Flash.flash_start + eprom_loc)=the_number;
- writeUserBlock(eprom_loc, sizeof(the_number));
+ writeUserBlock(&globals.Flash, eprom_loc, sizeof(the_number));
return OK;
break;