]> cloudbase.mooo.com Git - z180-stamp.git/commitdiff
include cleanup
authorLeo C <erbl259-lmu@yahoo.de>
Thu, 23 Oct 2014 11:07:27 +0000 (13:07 +0200)
committerLeo C <erbl259-lmu@yahoo.de>
Thu, 23 Oct 2014 11:07:27 +0000 (13:07 +0200)
14 files changed:
avr/Tupfile
avr/cli_readline.c
avr/cmd_boot.c
avr/cmd_date.c
avr/cmd_mem.c
avr/cmd_misc.c [moved from avr/cmd_echo.c with 100% similarity]
avr/cmd_pin.c
avr/command.c
avr/getopt-min.c
avr/timer.c
avr/z180-serv.c
include/command.h
include/common.h
include/debug.h

index 91562b4173eb347e8d3f665b2b52880614bea637..acb4aa54efca61dda0ee015afa1d2b8212da628a 100644 (file)
@@ -3,7 +3,7 @@ include_rules
 PROG           = stamp-monitor
 SRC            = main.c
 SRC            += cli.c cli_readline.c command.c command_tbl.c
-SRC            += cmd_help.c cmd_echo.c cmd_date.c cmd_mem.c cmd_boot.c cmd_pin.c
+SRC            += cmd_help.c cmd_date.c cmd_mem.c cmd_boot.c cmd_pin.c cmd_misc.c
 SRC            += env.c xmalloc.c date.c con-utils.c print-utils.c getopt-min.c
 SRC            += timer.c serial.c i2c.c pcf8583.c
 SRC            += background.c z180-serv.c z80-if.c pin.c
index 6b5f47e5ed27403bb37b3377cf31dd16adaf078d..1dbc73b1e027c3687c2086135a21aba853972d05 100644 (file)
@@ -11,7 +11,6 @@
 
 #include "common.h"
 
-#include <avr/pgmspace.h>
 #include <string.h>
 #include <stdio.h>
 
index c2f03519d846baa869600c3cbb09885c954c0844..1f99f2d65c7e8dcbef0bb76ff7d65c802e88c980 100644 (file)
@@ -4,7 +4,6 @@
  */
 #include "common.h"
 #include <stdlib.h>
-#include <avr/pgmspace.h>
 #include <util/atomic.h>
 
 #include "command.h"
@@ -195,6 +194,7 @@ command_ret_t do_console(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
 
                                case 'q':
                                case 'Q':
+                                       printf_P(PSTR("\n"));
                                        goto quit;
                                        break;
 
index 2396783812844c1f4116c4cd1bc083f407829ba7..ad0d3aca114458008876699fe0aa745caebdbb51 100644 (file)
@@ -10,7 +10,6 @@
  */
 #include <common.h>
 #include <string.h>
-#include <avr/pgmspace.h>
 #include <command.h>
 #include <rtc.h>
 #include <i2c.h>
index 66dc88f355d9b4f1f918a82b873552d77a15e911..500b973dcc6ec2a4445a4dba57b2ebe7ac01b4b7 100644 (file)
@@ -14,7 +14,6 @@
 #include "common.h"
 #include <stdlib.h>
 #include <ctype.h>
-#include <avr/pgmspace.h>
 
 #include "command.h"
 #include "cli_readline.h"
similarity index 100%
rename from avr/cmd_echo.c
rename to avr/cmd_misc.c
index b46b853de63acd13736799ebb6a61721a433addc..83a55f7eeddb1e69f78c7c4215f9173e5999a05e 100644 (file)
@@ -2,7 +2,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include <avr/pgmspace.h>
 
 #include "command.h"
 #include "print-utils.h"
index 2b53adfe921beb3d5a837021dbf0bea087593d5f..bb887941e462eccc0552c7a1485cf0c928f813ed 100644 (file)
@@ -7,7 +7,6 @@
 #include <string.h>
 #include <ctype.h>
 #include <stdio.h>
-#include <avr/pgmspace.h>
 
 #include "config.h"
 #include "print-utils.h"
index 571c14f8c6407854172ae352ca23c919c7de79d8..8e5dd6c3e026070ec3270808eea1ea71d7b4e02b 100644 (file)
@@ -1,5 +1,4 @@
 #include "common.h"
-#include <avr/pgmspace.h>
 
 
 /*
index e15a55bde51648b5aac2ec85296a130fa0b0dc88..67b4a491018ee2d02507956f57274d8eec93dcf7 100644 (file)
@@ -4,8 +4,6 @@
 
 #include "common.h"
 
-//#include <avr/power.h>
-//#include <avr/pgmspace.h>
 #include <avr/interrupt.h>
 #include <util/atomic.h>
 
index 2dbac6515ded462d24ac47f963784780192af1d3..56852cb4e4bb29e484cd63548a345a5b6ce60a52 100644 (file)
@@ -2,16 +2,12 @@
  */
 
 #include "common.h"
-//#include <avr/power.h>
-//#include <avr/pgmspace.h>
 #include <util/atomic.h>
-//#include <avr/sleep.h>
-//#include <string.h>
 
 #include "background.h"
-#include "debug.h"
 #include "serial.h"
 #include "z80-if.h"
+#include "debug.h"
 #include "z180-serv.h"
 
 
index 2fd20a0b4855382fb5d08911a123237d5c19e379..d0933a0b8fc8e73a16cd1c8322968bfe5f8eb584 100644 (file)
@@ -26,8 +26,8 @@
  * cmd_usage() all over the place.
  */
 typedef enum {
-       CMD_RET_SUCCESS,        /* 0 = Success */
-       CMD_RET_FAILURE,        /* 1 = Failure */
+       CMD_RET_SUCCESS = 0,    /* Success */
+       CMD_RET_FAILURE = 1,    /* Failure */
        CMD_RET_USAGE = -1,     /* Failure, please report 'usage' error */
 } command_ret_t;
 
index ef5af12b248940aadba8f1bdef6d16afbeafb0b7..74339df76dd0ce24d336ea5a50c434705ee41e2e 100644 (file)
@@ -3,6 +3,7 @@
 
 #ifdef __AVR__
 #include <avr/io.h>
+#include <avr/pgmspace.h>
 
 //TODO:
 //  Known to work: 4.8.4, 4.9.1
index 8fdc830e7f1f162f075d2214d3c3b641698b8a9a..45a1d504e0499d280917327687c9b88b3c1d8e32 100644 (file)
@@ -3,9 +3,6 @@
 #define DEBUG_H_
 
 #include "common.h"
-#ifdef __AVR__
-#include <avr/pgmspace.h>
-#endif
 
 #ifdef DEBUG
 #define _DEBUG 1