Setup some useful defaults for the RaspberryPi.
This commit is contained in:
parent
df1907fbea
commit
4e1dbe2bb6
@ -55,11 +55,15 @@ static int continue_terminal = 1;
|
|||||||
|
|
||||||
#ifdef RASPBERRY_PI
|
#ifdef RASPBERRY_PI
|
||||||
static int propellerResetGpioPin = 17;
|
static int propellerResetGpioPin = 17;
|
||||||
static int propellerResetGpioLevel = 1;
|
static int propellerResetGpioLevel = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Normally we use DTR for reset */
|
/* 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;
|
static reset_method_t reset_method = RESET_WITH_DTR;
|
||||||
|
#endif
|
||||||
|
|
||||||
int use_reset_method(char* method)
|
int use_reset_method(char* method)
|
||||||
{
|
{
|
||||||
|
4
p1load.c
4
p1load.c
@ -68,7 +68,11 @@ int main(int argc, char *argv[])
|
|||||||
/* initialize */
|
/* initialize */
|
||||||
baudRate = baudRate2 = BAUD_RATE;
|
baudRate = baudRate2 = BAUD_RATE;
|
||||||
verbose = terminalMode = pstMode = FALSE;
|
verbose = terminalMode = pstMode = FALSE;
|
||||||
|
#ifdef RASPBERRY_PI
|
||||||
|
port = "/dev/ttyAMA0";
|
||||||
|
#else
|
||||||
port = NULL;
|
port = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* initialize the loader */
|
/* initialize the loader */
|
||||||
PL_Init(&state, &serial, NULL);
|
PL_Init(&state, &serial, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user