Digi XBee(R) ANSI C Host Library
Macros | Functions | Variables

ANSI C xbee_readline() implementation that works for POSIX platforms (Win32, Linux, BSD, Mac OS X). More...

#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <termios.h>
#include <stdlib.h>

Macros

#define NB_ENABLE   0
 
#define NB_DISABLE   1
 
#define XBEE_READLINE_STATE_INIT   0
 
#define XBEE_READLINE_STATE_START_LINE   1
 
#define XBEE_READLINE_STATE_CONTINUE_LINE   2
 
#define XBEE_READLINE_STATE_EOF   -1
 

Functions

int kbhit ()
 
void _restore_tty (void)
 
void nonblock (int state)
 
int xbee_readline (char *buffer, int length)
 This function is a non-blocking version of gets(), used to read a line of input from the user. More...
 

Variables

struct termios _ttystate_orig
 

Detailed Description

ANSI C xbee_readline() implementation that works for POSIX platforms (Win32, Linux, BSD, Mac OS X).

Function documentation appears in xbee/platform.h.