gpio  1.4.2
General Purpose I/O Package
gpiobitbang.cxx File Reference

Bit bang pattern out GPIO pin. More...

#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string>
#include "rnr/rnrconfig.h"
#include "rnr/log.h"
#include "rnr/opts.h"
#include "rnr/pkg.h"
#include "rnr/gpio.h"
#include "version.h"

Go to the source code of this file.

Macros

#define APP_EC_OK   0
 success exit code
 
#define APP_EC_ARGS   2
 command-line options/arguments error exit code
 
#define APP_EC_EXEC   4
 execution exit code
 

Functions

static int strToInt (const string &str, int &val)
 
static int strToBits (const string &str, byte_t *p)
 
static void mainInit (int argc, char *argv[])
 Main initialization. More...
 
static int sysfsBitBang ()
 Bit bang bit pattern. More...
 
int main (int argc, char *argv[])
 Main. More...
 

Variables

static char * Argv0
 the command
 
static char * OptsMethod = (char *)"sysfs"
 system file system
 
static int OptsIbd = 1000
 inter-bit delay
 
static int ArgsGpio
 gpio number
 
static byte_t * ArgsPattern
 bit pattern to write
 
static size_t PatByteCount
 pattern byte count
 
static size_t PatBitCount
 pattern bit count
 
static OptsPgmInfo_T PgmInfo
 Program information. More...
 
static OptsInfo_T OptsInfo []
 Command line options information.
 

Detailed Description

Bit bang pattern out GPIO pin.

LastChangedDate
2015-04-08 17:22:10 -0600 (Wed, 08 Apr 2015)
Rev
3913
Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)

Definition in file gpiobitbang.cxx.