include/adxl345.h
author Tero Marttila <terom@paivola.fi>
Wed, 08 Oct 2014 23:20:34 +0300
changeset 11 a383e22204f2
permissions -rw-r--r--
adxl345: control/data registers read/write
#ifndef QMSK_ADXL345_H
#define QMSK_ADXL345_H

#include "port.h"
#include "stdlib.h"

/*
 * Setup ADXL345_CS as the chip-select pin.
 */
void adxl345_init ();

byte adxl345_read_devid ();

/*
 * Setup for measurements.
 */
void adxl345_setup ();

int16_t adxl345_read_x ();
int16_t adxl345_read_y ();
int16_t adxl345_read_z ();

#endif