diff rvinterf/etmsync/fsnew.c @ 813:37b38b1a1136

fc-fsio write-bsim-config implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 13 May 2021 05:11:36 +0000
parents 2cd5ac909e23
children
line wrap: on
line diff
--- a/rvinterf/etmsync/fsnew.c	Mon May 10 01:13:07 2021 +0000
+++ b/rvinterf/etmsync/fsnew.c	Thu May 13 05:11:36 2021 +0000
@@ -74,3 +74,16 @@
 	return upload_fc_table_from_ascii(argv[1], charging_compile_tool,
 					  "/etc/charging");
 }
+
+cmd_write_bsim_config(argc, argv)
+	char **argv;
+{
+	static char filename[] = "/etc/batterysim";
+	u_char bytes[4];
+
+	bytes[0] = strtoul(argv[1], 0, 0);
+	bytes[1] = strtoul(argv[2], 0, 0);
+	bytes[2] = 0;	/* RFU */
+	bytes[3] = 0;	/* RFU */
+	return do_short_fwrite(filename, bytes, 4);
+}