@@ -12,6 +12,7 @@
|
|||||||
#ifndef _lcdproc_machine_h_
|
#ifndef _lcdproc_machine_h_
|
||||||
#define _lcdproc_machine_h_
|
#define _lcdproc_machine_h_
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
#include "shared/LL.h"
|
#include "shared/LL.h"
|
||||||
|
|
||||||
#ifndef LOADAVG_NSTATS
|
#ifndef LOADAVG_NSTATS
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ lcdrpi_HD44780_close(PrivateData *p)
|
|||||||
|
|
||||||
/* Unmap and free memory */
|
/* Unmap and free memory */
|
||||||
if (gpio_map != NULL)
|
if (gpio_map != NULL)
|
||||||
munmap((caddr_t) gpio_map, GPIO_BLOCK_SIZE);
|
munmap((void *) gpio_map, GPIO_BLOCK_SIZE);
|
||||||
if (p->rpi_gpio != NULL)
|
if (p->rpi_gpio != NULL)
|
||||||
free(p->rpi_gpio);
|
free(p->rpi_gpio);
|
||||||
p->rpi_gpio = NULL;
|
p->rpi_gpio = NULL;
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <sys/file.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ typedef struct rawserial_private_data {
|
|||||||
/** \name Event loop timing. refresh_time and refresh_delta form the
|
/** \name Event loop timing. refresh_time and refresh_delta form the
|
||||||
* event loop timing mechanism for configurable update rates.
|
* event loop timing mechanism for configurable update rates.
|
||||||
*@{*/
|
*@{*/
|
||||||
uint refresh_time; /**< time at the last screen update */
|
unsigned int refresh_time; /**< time at the last screen update */
|
||||||
uint refresh_delta; /**< time step to next screen update */
|
unsigned int refresh_delta; /**< time step to next screen update */
|
||||||
/**@}*/
|
/**@}*/
|
||||||
} PrivateData;
|
} PrivateData;
|
||||||
|
|
||||||
/* Local prototypes */
|
/* Local prototypes */
|
||||||
static uint get_millisecond_time(void);
|
static unsigned int get_millisecond_time(void);
|
||||||
|
|
||||||
|
|
||||||
/* Vars for the server core */
|
/* Vars for the server core */
|
||||||
@@ -303,7 +303,7 @@ rawserial_flush(Driver *drvthis)
|
|||||||
PrivateData *p = drvthis->private_data;
|
PrivateData *p = drvthis->private_data;
|
||||||
char out[LCD_MAX_WIDTH * LCD_MAX_HEIGHT];
|
char out[LCD_MAX_WIDTH * LCD_MAX_HEIGHT];
|
||||||
|
|
||||||
uint currentTime = get_millisecond_time();
|
unsigned int currentTime = get_millisecond_time();
|
||||||
int t_delta = currentTime - p->refresh_time;
|
int t_delta = currentTime - p->refresh_time;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -415,7 +415,7 @@ rawserial_get_info(Driver *drvthis)
|
|||||||
*
|
*
|
||||||
* \return int with current millisecond time.
|
* \return int with current millisecond time.
|
||||||
*/
|
*/
|
||||||
static uint
|
static unsigned
|
||||||
get_millisecond_time(void)
|
get_millisecond_time(void)
|
||||||
{
|
{
|
||||||
struct timeval ts;
|
struct timeval ts;
|
||||||
|
|||||||
Reference in New Issue
Block a user