graphics/ft80x: Fix error: implicit declaration of function 'getpid
report here: https://github.com/apache/nuttx/actions/runs/4100097451/jobs/7070641033 Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
8a131cb7e7
commit
0f9642d403
@ -30,6 +30,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <nuttx/lcd/ft80x.h>
|
#include <nuttx/lcd/ft80x.h>
|
||||||
|
|
||||||
@ -214,10 +215,13 @@ uint16_t ft80x_ramcmd_freespace(int fd, FAR uint16_t *offset,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the free space in the FIFO. NOTE that 4 bytes are not available */
|
/* Return the free space in the FIFO. NOTE that 4 bytes are not
|
||||||
|
* available
|
||||||
|
*/
|
||||||
|
|
||||||
*offset = regs[1] & FT80X_CMDFIFO_MASK;
|
*offset = regs[1] & FT80X_CMDFIFO_MASK;
|
||||||
*avail = (FT80X_CMDFIFO_SIZE - 4) - ((regs[1] - regs[0]) & FT80X_CMDFIFO_MASK);
|
*avail = (FT80X_CMDFIFO_SIZE - 4) -
|
||||||
|
((regs[1] - regs[0]) & FT80X_CMDFIFO_MASK);
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -270,7 +274,9 @@ int ft80x_ramcmd_waitfifoempty(int fd)
|
|||||||
|
|
||||||
for (; ; )
|
for (; ; )
|
||||||
{
|
{
|
||||||
/* Read both the FT80X_REG_CMD_WRITE and FT80X_REG_CMD_READ registers. */
|
/* Read both the FT80X_REG_CMD_WRITE and FT80X_REG_CMD_READ
|
||||||
|
* registers.
|
||||||
|
*/
|
||||||
|
|
||||||
ret = ft80x_getregs(fd, FT80X_REG_CMD_READ, 2, regs);
|
ret = ft80x_getregs(fd, FT80X_REG_CMD_READ, 2, regs);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -323,7 +329,9 @@ int ft80x_ramcmd_waitfifoempty(int fd)
|
|||||||
ioctl(fd, FT80X_IOC_EVENTNOTIFY,
|
ioctl(fd, FT80X_IOC_EVENTNOTIFY,
|
||||||
(unsigned long)((uintptr_t)¬ify));
|
(unsigned long)((uintptr_t)¬ify));
|
||||||
|
|
||||||
/* Check if the signal was received correctly or if the timeout occurred. */
|
/* Check if the signal was received correctly or if the timeout
|
||||||
|
* occurred.
|
||||||
|
*/
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <nuttx/lcd/ft80x.h>
|
#include <nuttx/lcd/ft80x.h>
|
||||||
|
|
||||||
@ -94,7 +95,8 @@ int ft80x_touch_gettransform(int fd, FAR uint32_t matrix[6])
|
|||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* A value of 1-255 is returned if a graphics object is touched. Zero is
|
* A value of 1-255 is returned if a graphics object is touched. Zero is
|
||||||
* returned if no graphics object is touched. A negated errno value on failure.
|
* returned if no graphics object is touched. A negated errno value on
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -138,7 +140,8 @@ int ft80x_touch_tag(int fd)
|
|||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* A value of 1-255 is returned if a graphics object is touched. Zero is
|
* A value of 1-255 is returned if a graphics object is touched. Zero is
|
||||||
* returned if no graphics object is touched. A negated errno value on failure.
|
* returned if no graphics object is touched. A negated errno value on
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@ -224,7 +227,9 @@ int ft80x_touch_waittag(int fd, uint8_t oldtag)
|
|||||||
ioctl(fd, FT80X_IOC_EVENTNOTIFY,
|
ioctl(fd, FT80X_IOC_EVENTNOTIFY,
|
||||||
(unsigned long)((uintptr_t)¬ify));
|
(unsigned long)((uintptr_t)¬ify));
|
||||||
|
|
||||||
/* Check if the signal was received correctly or if the timeout occurred. */
|
/* Check if the signal was received correctly or if the timeout
|
||||||
|
* occurred.
|
||||||
|
*/
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
@ -261,7 +266,8 @@ int ft80x_touch_waittag(int fd, uint8_t oldtag)
|
|||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* A value of 1-255 is returned if a graphics object is touched. Zero is
|
* A value of 1-255 is returned if a graphics object is touched. Zero is
|
||||||
* returned if no graphics object is touched. A negated errno value on failure.
|
* returned if no graphics object is touched. A negated errno value on
|
||||||
|
* failure.
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user