apps/graphics/ft80x: Correct time units in usleep call.
This commit is contained in:
parent
5945a09d6d
commit
a0a16e2ec8
@ -50,6 +50,13 @@
|
|||||||
#include "graphics/ft80x.h"
|
#include "graphics/ft80x.h"
|
||||||
#include "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
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -86,7 +93,7 @@ int ft80x_coproc_waitlogo(int fd)
|
|||||||
* seconds elapses.
|
* seconds elapses.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
for (elapsed = 0; elapsed < 10; elapsed++)
|
for (elapsed = 0; elapsed < FIVE_SECONDS; elapsed++)
|
||||||
{
|
{
|
||||||
/* Read REG_CMD_WRITE */
|
/* Read REG_CMD_WRITE */
|
||||||
|
|
||||||
@ -122,7 +129,7 @@ int ft80x_coproc_waitlogo(int fd)
|
|||||||
|
|
||||||
/* Wait for a half a second */
|
/* 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);
|
ft80x_err("ERROR: Timed out! Last head/tail = %u/%u\n", head, tail);
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
#include "ft80x.h"
|
#include "ft80x.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Defitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
/* Sleep for 10 MS between each REG_DLSWAP poll */
|
/* Sleep for 10 MS between each REG_DLSWAP poll */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user