sketchbook
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
gertboard.c File Reference
#include <stdio.h>
#include <stdint.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/spi/spidev.h>
#include <wiringPi.h>
#include <wiringPiSPI.h>
#include "gertboard.h"

Macros

#define SPI_ADC_SPEED   1000000
 
#define SPI_DAC_SPEED   1000000
 
#define SPI_A2D   0
 
#define SPI_D2A   1
 

Functions

void gertboardAnalogWrite (const int chan, const int value)
 
int gertboardAnalogRead (const int chan)
 
int gertboardSPISetup (void)
 
int gertboardAnalogSetup (const int pinBase)
 

Macro Definition Documentation

#define SPI_A2D   0
#define SPI_ADC_SPEED   1000000
#define SPI_D2A   1
#define SPI_DAC_SPEED   1000000

Function Documentation

int gertboardAnalogRead ( const int  chan)
int gertboardAnalogSetup ( const int  pinBase)
void gertboardAnalogWrite ( const int  chan,
const int  value 
)
int gertboardSPISetup ( void  )