Remove some debugging output.

This commit is contained in:
David Betz 2015-02-10 16:55:23 -05:00
parent 790876834c
commit a0b34a4bea
4 changed files with 9 additions and 1 deletions

View File

@ -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)
{
printf ("(HIGH).\n");

View File

@ -59,6 +59,11 @@ static int cb_rx_timeout(void *data, uint8_t* buf, int n, int 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)
{
switch (phase) {
@ -120,6 +125,7 @@ int main(int argc, char *argv[])
state.tx = cb_tx;
state.rx_timeout = cb_rx_timeout;
state.progress = cb_progress;
state.msleep = cb_msleep;
#ifdef RASPBERRY_PI
{
char cmd[20] = "gpio,17,0";

View File

@ -97,6 +97,7 @@ static int WaitForAck(PL_state *state, int retries)
{
uint8_t buf[1];
while (--retries >= 0) {
(*state->msleep)(state->serialData, 20);
TByte(state, 0xf9);
TComm(state);
if ((*state->rx_timeout)(state->serialData, buf, 1, ACK_TIMEOUT) > 0)

View File

@ -45,6 +45,7 @@ typedef struct {
void (*reset)(void *data);
int (*tx)(void *data, uint8_t* buf, int n);
int (*rx_timeout)(void *data, uint8_t* buf, int n, int timeout);
void (*msleep)(void *data, int msecs);
void *serialData;
/* load progress interface */