summaryrefslogtreecommitdiffstats
path: root/pressure_control/firmware
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-04-10 20:57:01 +0200
committerMichael Buesch <mb@bu3sch.de>2009-04-10 20:57:01 +0200
commitdb5b4c6bd4f54aaee15b2ed4193531888123614e (patch)
treef35f68023f767b4207ee7f1854cf6bd93cfc023f /pressure_control/firmware
parentdf38ebd1116faeb659a5a3f5c43946c3438ca0fe (diff)
downloadcnc-db5b4c6bd4f54aaee15b2ed4193531888123614e.tar.xz
cnc-db5b4c6bd4f54aaee15b2ed4193531888123614e.zip
pressure_control: Log the build date and compiler version
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'pressure_control/firmware')
-rw-r--r--pressure_control/firmware/main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/pressure_control/firmware/main.c b/pressure_control/firmware/main.c
index 992555b..593e2a5 100644
--- a/pressure_control/firmware/main.c
+++ b/pressure_control/firmware/main.c
@@ -163,6 +163,20 @@ static void check_pressure(void)
}
}
+static void print_banner(void)
+{
+ char str[128];
+
+ strcpy(str, "Pressure control -- " __DATE__ " -- GCC-");
+ num16_to_ascii((uint8_t *)str + strlen(str), __GNUC__);
+ strcat(str, ".");
+ num16_to_ascii((uint8_t *)str + strlen(str), __GNUC_MINOR__);
+ strcat(str, ".");
+ num16_to_ascii((uint8_t *)str + strlen(str), __GNUC_PATCHLEVEL__);
+ strcat(str, "\n");
+ print_sram(str);
+}
+
int main(void)
{
cli();
@@ -172,7 +186,7 @@ int main(void)
* receive any remote commands, yet. But early init allows us
* to send error messages early. */
remote_init();
- print("Pressure control initializing...\n");
+ print_banner();
valves_init();
sensor_init();
bues.ch cgit interface