Remove some debugging output.
This commit is contained in:
parent
790876834c
commit
a0b34a4bea
@ -89,7 +89,7 @@ int use_reset_method(char* method)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("Using GPIO pin %d as Propeller reset ", propellerResetGpioPin);
|
//printf ("Using GPIO pin %d as Propeller reset ", propellerResetGpioPin);
|
||||||
if (propellerResetGpioLevel)
|
if (propellerResetGpioLevel)
|
||||||
{
|
{
|
||||||
printf ("(HIGH).\n");
|
printf ("(HIGH).\n");
|
||||||
|
6
p1load.c
6
p1load.c
@ -59,6 +59,11 @@ static int cb_rx_timeout(void *data, uint8_t* buf, int n, int timeout)
|
|||||||
return rx_timeout(buf, n, timeout);
|
return rx_timeout(buf, n, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void cb_msleep(void *data, int msecs)
|
||||||
|
{
|
||||||
|
msleep(msecs);
|
||||||
|
}
|
||||||
|
|
||||||
static void cb_progress(void *data, int phase)
|
static void cb_progress(void *data, int phase)
|
||||||
{
|
{
|
||||||
switch (phase) {
|
switch (phase) {
|
||||||
@ -120,6 +125,7 @@ int main(int argc, char *argv[])
|
|||||||
state.tx = cb_tx;
|
state.tx = cb_tx;
|
||||||
state.rx_timeout = cb_rx_timeout;
|
state.rx_timeout = cb_rx_timeout;
|
||||||
state.progress = cb_progress;
|
state.progress = cb_progress;
|
||||||
|
state.msleep = cb_msleep;
|
||||||
#ifdef RASPBERRY_PI
|
#ifdef RASPBERRY_PI
|
||||||
{
|
{
|
||||||
char cmd[20] = "gpio,17,0";
|
char cmd[20] = "gpio,17,0";
|
||||||
|
@ -97,6 +97,7 @@ static int WaitForAck(PL_state *state, int retries)
|
|||||||
{
|
{
|
||||||
uint8_t buf[1];
|
uint8_t buf[1];
|
||||||
while (--retries >= 0) {
|
while (--retries >= 0) {
|
||||||
|
(*state->msleep)(state->serialData, 20);
|
||||||
TByte(state, 0xf9);
|
TByte(state, 0xf9);
|
||||||
TComm(state);
|
TComm(state);
|
||||||
if ((*state->rx_timeout)(state->serialData, buf, 1, ACK_TIMEOUT) > 0)
|
if ((*state->rx_timeout)(state->serialData, buf, 1, ACK_TIMEOUT) > 0)
|
||||||
|
@ -45,6 +45,7 @@ typedef struct {
|
|||||||
void (*reset)(void *data);
|
void (*reset)(void *data);
|
||||||
int (*tx)(void *data, uint8_t* buf, int n);
|
int (*tx)(void *data, uint8_t* buf, int n);
|
||||||
int (*rx_timeout)(void *data, uint8_t* buf, int n, int timeout);
|
int (*rx_timeout)(void *data, uint8_t* buf, int n, int timeout);
|
||||||
|
void (*msleep)(void *data, int msecs);
|
||||||
void *serialData;
|
void *serialData;
|
||||||
|
|
||||||
/* load progress interface */
|
/* load progress interface */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user