Permalink
Browse files

some more renamings, EEPROM support

  • Loading branch information...
1 parent e06b87c commit e2b4c57845283b24cb019bed6b1457c792da29ff @andreas23 committed May 31, 2011
Showing with 24 additions and 7 deletions.
  1. +5 −0 core/eeprom.c
  2. +11 −0 core/eeprom.h
  3. +2 −2 services/brewtronic/Makefile
  4. +2 −1 services/brewtronic/brewtronic.h
  5. +4 −4 services/brewtronic/ecmd.c
View
5 core/eeprom.c
@@ -136,6 +136,11 @@ eeprom_init (void)
#ifdef MOTD_SUPPORT
eeprom_save_P(motd_text, PSTR(CONF_MOTD_DEFAULT), MOTD_VALUESIZE);
#endif
+
+#ifdef BREWTRONIC_SUPPORT
+ // TODO: implement reasonable EEPROM init code
+#endif
+
eeprom_update_chksum();
}
View
11 core/eeprom.h
@@ -49,6 +49,10 @@
#include "services/motd/motd.h"
#endif
+#ifdef BREWTRONIC_SUPPORT
+#include "services/brewtronic/brewtronic.h"
+#endif
+
struct eeprom_config_t {
#ifdef ETHERNET_SUPPORT
uint8_t mac[6];
@@ -104,6 +108,13 @@ struct eeprom_config_t {
char motd_text[MOTD_VALUESIZE];
#endif
+// TODO: change size constant names to match overal naming scheme
+#ifdef BREWTRONIC_SUPPORT
+ uint8_t rast_temp_ee[MAX_BREW];
+ uint8_t rast_zeit_ee[MAX_BREW];
+ uint8_t t_hist_ee[MAX_HIST];
+#endif
+
uint8_t crc;
};
View
4 services/brewtronic/Makefile
@@ -1,8 +1,8 @@
TOPDIR ?= ../..
include $(TOPDIR)/.config
-$(APP_SAMPLE_SUPPORT)_SRC += services/brewtronic/brewtronic.c
-$(APP_SAMPLE_SUPPORT)_ECMD_SRC += services/brewtronic/ecmd.c
+$(BREWTRONIC_SUPPORT)_SRC += services/brewtronic/brewtronic.c
+$(BREWTRONIC_SUPPORT)_ECMD_SRC += services/brewtronic/ecmd.c
##############################################################################
# generic fluff
View
3 services/brewtronic/brewtronic.h
@@ -35,7 +35,8 @@ app_sample_init(void);
int16_t
app_sample_periodic(void);
-
+#define MAX_BREW 20
+#define MAX_HIST 200
#include "config.h"
#ifdef DEBUG_BREWTRONIC
View
8 services/brewtronic/ecmd.c
@@ -28,7 +28,7 @@
#include <util/delay.h>
#include "config.h"
-#include "appsample.h"
+#include "brewtronic.h"
#include "protocols/ecmd/ecmd-base.h"
int16_t parse_cmd_brew_set_command(char *cmd, char *output, uint16_t len)
@@ -87,13 +87,13 @@ int16_t parse_cmd_brew_start_command(char *cmd, char *output, uint16_t len)
/*
-- Ethersex META --
-block([[Application_Sample]])
+block([[Brewtronic]])
ecmd_feature(brew_set_command, "brewset",[step] [temp] [time], Set rast)
ecmd_feature(brew_restore_command, "brewrest",, restore)
ecmd_feature(brew_save_command, "brewsave",, save)
ecmd_feature(brew_start_command, "brewstart",, save)
ecmd_feature(brew_temp_command, "brewtemp",, save)
ecmd_feature(brew_hist_command, "brewhist",, save)
-ecmd_feature(app_sample_init, "brewinit",, Manually call application sample init method)
-ecmd_feature(app_sample_periodic, "brewperiodic",, Manually call application sample periodic method)
+ecmd_feature(brewtronic_init, "brewinit",, Manually call application sample init method)
+ecmd_feature(brewtronic_periodic, "brewperiodic",, Manually call application sample periodic method)
*/

0 comments on commit e2b4c57

Please sign in to comment.