Move argc/argv processing deeper into simulator.

Less magic == more better.
This commit is contained in:
Phil Hord 2013-10-27 16:00:04 -04:00 committed by Markus Hitter
parent 452e2e5cd9
commit b65efe9b03
2 changed files with 10 additions and 4 deletions

View File

@ -232,12 +232,9 @@ void init(void) {
///
/// just run init(), then run an endless loop where we pass characters from the serial RX buffer to gcode_parse_char() and check the clocks
#ifdef SIMULATOR
int g_argc;
char** g_argv;
int main (int argc, char** argv)
{
g_argc = argc;
g_argv = argv;
sim_start(argc, argv);
#else
int main (void)
{

View File

@ -27,6 +27,15 @@ volatile uint8_t
DIO3_WPORT,
DIO4_WPORT;
int g_argc;
char** g_argv;
void sim_start(int argc, char** argv) {
// TODO: Parse args here and open the serial port instead of saving them
// for serial_init.
// Save these for the serial_init code
g_argc = argc;
g_argv = argv;
}
/* -- debugging ------------------------------------------------------------ */