PropWare  3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Macros | Functions | Variables
wiring_analog.c File Reference

Provides Arduino types and functions on the Propeller. More...

#include <Arduino.h>
+ Include dependency graph for wiring_analog.c:

Go to the source code of this file.

Macros

#define SE_0   0x08
 
#define SE_1   0x09
 
#define SE_2   0x0A
 
#define SE_3   0x0B
 
#define SE_4   0x0C
 
#define SE_5   0x0D
 
#define SE_6   0x0E
 
#define SE_7   0x0F
 
#define D_01   0x00
 
#define D_10   0x01
 
#define D_23   0x02
 
#define D_32   0x03
 
#define D_45   0x04
 
#define D_54   0x05
 
#define D_67   0x06
 
#define D_76   0x07
 

Functions

void init (int cspin, int clkpin, int diopin)
 
void finalize ()
 
int do_adc_cmd (int mux)
 
int read_adc_channel (int ch_mode)
 
int analogRead (uint8_t adcChannel)
 
void analogReference (uint8_t mode)
 
void analogWrite (uint8_t pin, int duty)
 

Variables

static const int Ctrduty = 6
 
static const int Dutyperiod = 0x1010101
 
static const int adcChannel2SE [8] = {SE_0, SE_1, SE_2, SE_3, SE_4, SE_5, SE_6, SE_7}
 
static const int clockDelay = 400
 
volatile int cs
 
volatile int clk
 
volatile int dio
 

Detailed Description

Provides Arduino types and functions on the Propeller.

Copyright (c) 2013 by Martin Heermance ASC ADC Code Copyright (c) 2013 Michael Swartzendruber MIT Licensed

Definition in file wiring_analog.c.