Defines | Functions | Variables
geniePi.c File Reference
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <sys/time.h>
#include <sched.h>
#include <pthread.h>
#include "geniePi.h"
Include dependency graph for geniePi.c:

Go to the source code of this file.

Defines

#define FALSE   (1==0)
#define MAX_GENIE_REPLYS   16
#define TRUE   (1==1)

Functions

static int _genieReadObj (int object, int index)
static int _genieSetPin (int mode, int pin)
static int _genieWriteContrast (int value)
static int _genieWriteObj (int object, int index, unsigned int data)
static int _genieWriteStr (int index, char *string)
static int _genieWriteStrU (int index, char *string)
static void delay (unsigned int howLong)
static void delayMicroseconds (unsigned int howLong)
void genieClose (void)
static int genieDataAvail (int fd)
static void genieFlush (int fd)
static int genieGetchar (void)
void genieGetReply (struct genieReplyStruct *reply)
static int genieOpen (char *device, int baud)
static void geniePutchar (int data)
int genieReadObj (int object, int index)
int genieReplyAvail (void)
static void * genieReplyListener (void *data)
int genieSetPin (int mode, int pin)
int genieSetup (char *device, int baud)
int genieWriteContrast (int value)
int genieWriteObj (int object, int index, unsigned int data)
int genieWriteStr (int index, char *string)
int genieWriteStrU (int index, char *string)
static unsigned int millis (void)

Variables

static unsigned long long epoch
static int genieAck = FALSE
static int genieChecksumErrors = 0
static int genieFd = -1
static pthread_mutex_t genieMutex
static int genieNak = FALSE
static struct genieReplyStruct genieReplys [MAX_GENIE_REPLYS]
static int genieReplysHead = 0
static int genieReplysTail = 0
static int genieTimeouts = 0

Define Documentation

#define FALSE   (1==0)

Definition at line 48 of file geniePi.c.

#define MAX_GENIE_REPLYS   16

Definition at line 54 of file geniePi.c.

#define TRUE   (1==1)

Definition at line 47 of file geniePi.c.


Function Documentation

static int _genieReadObj ( int  object,
int  index 
) [static]

Definition at line 384 of file geniePi.c.

static int _genieSetPin ( int  mode,
int  pin 
) [static]

Definition at line 613 of file geniePi.c.

static int _genieWriteContrast ( int  value) [static]

Definition at line 485 of file geniePi.c.

static int _genieWriteObj ( int  object,
int  index,
unsigned int  data 
) [static]

Definition at line 442 of file geniePi.c.

static int _genieWriteStr ( int  index,
char *  string 
) [static]

Definition at line 523 of file geniePi.c.

static int _genieWriteStrU ( int  index,
char *  string 
) [static]

Definition at line 553 of file geniePi.c.

static void delay ( unsigned int  howLong) [static]

Definition at line 213 of file geniePi.c.

static void delayMicroseconds ( unsigned int  howLong) [static]

Definition at line 223 of file geniePi.c.

void genieClose ( void  )

Definition at line 171 of file geniePi.c.

static int genieDataAvail ( int  fd) [static]

Definition at line 183 of file geniePi.c.

static void genieFlush ( int  fd) [static]

Definition at line 159 of file geniePi.c.

static int genieGetchar ( void  ) [static]

Definition at line 241 of file geniePi.c.

void genieGetReply ( struct genieReplyStruct reply)

Definition at line 367 of file geniePi.c.

static int genieOpen ( char *  device,
int  baud 
) [static]

Definition at line 84 of file geniePi.c.

static void geniePutchar ( int  data) [static]

Definition at line 266 of file geniePi.c.

int genieReadObj ( int  object,
int  index 
)

Definition at line 423 of file geniePi.c.

int genieReplyAvail ( void  )

Definition at line 354 of file geniePi.c.

static void* genieReplyListener ( void *  data) [static]

Definition at line 280 of file geniePi.c.

int genieSetPin ( int  mode,
int  pin 
)

Definition at line 634 of file geniePi.c.

int genieSetup ( char *  device,
int  baud 
)

Definition at line 655 of file geniePi.c.

int genieWriteContrast ( int  value)

Definition at line 504 of file geniePi.c.

int genieWriteObj ( int  object,
int  index,
unsigned int  data 
)

Definition at line 467 of file geniePi.c.

int genieWriteStr ( int  index,
char *  string 
)

Definition at line 584 of file geniePi.c.

int genieWriteStrU ( int  index,
char *  string 
)

Definition at line 595 of file geniePi.c.

static unsigned int millis ( void  ) [static]

Definition at line 201 of file geniePi.c.


Variable Documentation

unsigned long long epoch [static]

Definition at line 199 of file geniePi.c.

int genieAck = FALSE [static]

Definition at line 66 of file geniePi.c.

int genieChecksumErrors = 0 [static]

Definition at line 68 of file geniePi.c.

int genieFd = -1 [static]

Definition at line 74 of file geniePi.c.

pthread_mutex_t genieMutex [static]

Definition at line 72 of file geniePi.c.

int genieNak = FALSE [static]

Definition at line 67 of file geniePi.c.

Definition at line 56 of file geniePi.c.

int genieReplysHead = 0 [static]

Definition at line 57 of file geniePi.c.

int genieReplysTail = 0 [static]

Definition at line 58 of file geniePi.c.

int genieTimeouts = 0 [static]

Definition at line 69 of file geniePi.c.



mrp2_display
Author(s): Bolkar Altuntas
autogenerated on Thu Jun 6 2019 21:43:35