xyControl  0.1
Quadrotor Flight Controller on AVR Basis
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Macros | Functions | Variables
acc.c File Reference

LSM303DLHC Accelerometer API Implementation. More...

#include <avr/io.h>
#include <stdint.h>
#include <stdlib.h>
#include <twi.h>
#include <acc.h>
#include <error.h>
#include <config.h>

Go to the source code of this file.

Macros

#define ACCREG_CTRL1   0x20
 Accelerometer Control Register 1. More...
 
#define ACCREG_CTRL4   0x23
 Accelerometer Control Register 4. More...
 
#define ACCREG_XL   0x28
 First Accelerometer Output Register. More...
 

Functions

Error accWriteRegister (uint8_t reg, uint8_t val)
 Write an Accelerometer Register. More...
 
Error accInit (AccRange r)
 Initialize the Accelerometer. More...
 
Error accRead (Vector3f *v)
 Read from the Accelerometer. More...
 

Variables

AccRange accRange
 Stored range to scale returned values. More...
 

Detailed Description

LSM303DLHC Accelerometer API Implementation.

Definition in file acc.c.