From 4e1dbe2bb6018a39586f80f530ec622a39ebc204 Mon Sep 17 00:00:00 2001 From: David Betz Date: Tue, 27 Jan 2015 19:49:42 -0500 Subject: [PATCH] Setup some useful defaults for the RaspberryPi. --- osint_linux.c | 6 +++++- p1load.c | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/osint_linux.c b/osint_linux.c index f418f7a..5dec9a6 100644 --- a/osint_linux.c +++ b/osint_linux.c @@ -55,11 +55,15 @@ static int continue_terminal = 1; #ifdef RASPBERRY_PI static int propellerResetGpioPin = 17; -static int propellerResetGpioLevel = 1; +static int propellerResetGpioLevel = 0; #endif /* Normally we use DTR for reset */ +#ifdef RASPBERRY_PI +static reset_method_t reset_method = RESET_WITH_GPIO; +#else static reset_method_t reset_method = RESET_WITH_DTR; +#endif int use_reset_method(char* method) { diff --git a/p1load.c b/p1load.c index c0024db..ad57d57 100644 --- a/p1load.c +++ b/p1load.c @@ -68,7 +68,11 @@ int main(int argc, char *argv[]) /* initialize */ baudRate = baudRate2 = BAUD_RATE; verbose = terminalMode = pstMode = FALSE; +#ifdef RASPBERRY_PI + port = "/dev/ttyAMA0"; +#else port = NULL; +#endif /* initialize the loader */ PL_Init(&state, &serial, NULL);