apps/graphics/ft80x: Correct time units in usleep call.

This commit is contained in:
Gregory Nutt 2018-02-22 06:30:54 -06:00
parent 5945a09d6d
commit a0a16e2ec8
2 changed files with 10 additions and 3 deletions

View File

@ -50,6 +50,13 @@
#include "graphics/ft80x.h"
#include "ft80x.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
#define HALF_SECOND (500 * 1000) /* 500 milliseconds (units = microseconds) */
#define FIVE_SECONDS (5 * 2) /* 5 seconds (units = half seconds) */
/****************************************************************************
* Public Functions
****************************************************************************/
@ -86,7 +93,7 @@ int ft80x_coproc_waitlogo(int fd)
* seconds elapses.
*/
for (elapsed = 0; elapsed < 10; elapsed++)
for (elapsed = 0; elapsed < FIVE_SECONDS; elapsed++)
{
/* Read REG_CMD_WRITE */
@ -122,7 +129,7 @@ int ft80x_coproc_waitlogo(int fd)
/* Wait for a half a second */
(void)usleep(500 * 1000 * 1000);
(void)usleep(HALF_SECOND);
}
ft80x_err("ERROR: Timed out! Last head/tail = %u/%u\n", head, tail);

View File

@ -51,7 +51,7 @@
#include "ft80x.h"
/****************************************************************************
* Pre-processor Defitions
* Pre-processor Definitions
****************************************************************************/
/* Sleep for 10 MS between each REG_DLSWAP poll */