Defines | Functions | Variables
bma180-writer.cpp File Reference
#include <sstream>
#include <iostream>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <ctime>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <linux/spi/spidev.h>
#include <sched.h>
#include <ros/ros.h>
#include <std_msgs/String.h>
#include <gumstix_memwrite_bma180/writermsg.h>
#include <errno.h>
Include dependency graph for bma180-writer.cpp:

Go to the source code of this file.

Defines

#define ARRAY_SIZE(a)   (sizeof(a) / sizeof((a)[0]))
#define NUM_SENSORS   8
#define SHMSZ   30720000
#define xSHMSZ   0x1D4C000

Functions

static void conv_device (int ret, int fd)
int main (int argc, char **argv)
static void pabort (const char *s)
int16_t reint_as_2c (char chMSB, char chLSB)
int udelay (unsigned int usecs)

Variables

static uint8_t bits = 8
static uint16_t delay = 0
static const char * device0 = "/dev/spidev1.1"
static uint8_t mode = SPI_MODE_3
static uint32_t speed = 6000000

Define Documentation

#define ARRAY_SIZE (   a)    (sizeof(a) / sizeof((a)[0]))

Definition at line 38 of file bma180-writer.cpp.

#define NUM_SENSORS   8

Definition at line 39 of file bma180-writer.cpp.

#define SHMSZ   30720000

Definition at line 40 of file bma180-writer.cpp.

#define xSHMSZ   0x1D4C000

Definition at line 41 of file bma180-writer.cpp.


Function Documentation

static void conv_device ( int  ret,
int  fd 
) [static]

Definition at line 59 of file bma180-writer.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 131 of file bma180-writer.cpp.

static void pabort ( const char *  s) [static]

Definition at line 54 of file bma180-writer.cpp.

int16_t reint_as_2c ( char  chMSB,
char  chLSB 
)

Definition at line 92 of file bma180-writer.cpp.

int udelay ( unsigned int  usecs)

Definition at line 110 of file bma180-writer.cpp.


Variable Documentation

uint8_t bits = 8 [static]

Definition at line 47 of file bma180-writer.cpp.

uint16_t delay = 0 [static]

Definition at line 49 of file bma180-writer.cpp.

const char* device0 = "/dev/spidev1.1" [static]

Definition at line 45 of file bma180-writer.cpp.

uint8_t mode = SPI_MODE_3 [static]

Definition at line 46 of file bma180-writer.cpp.

uint32_t speed = 6000000 [static]

Definition at line 48 of file bma180-writer.cpp.



gumstix_memwrite_bma180
Author(s): Nikhil Deshpande (Maintained by Philip Roan)
autogenerated on Sat Dec 28 2013 16:48:45