hw/battery: Only build shell when enabled
If application doesn't use shell, then build will fail because of
missing #include <shell/shell.h>
* under the License.
*/
+#include "syscfg/syscfg.h"
+#if MYNEWT_VAL(BATTERY_SHELL)
+
#include <stdio.h>
#include <string.h>
#include <limits.h>
@@ -539,3 +542,5 @@ battery_shell_register(void)
rc = shell_cmd_register(&bat_cli_cmd);
SYSINIT_PANIC_ASSERT_MSG(rc == 0, "Failed to register battery shell");
}
+
+#endif
