Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/spi/spi.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include "ad2s1210.h"
Go to the source code of this file.
Data Structures | |
struct | ad2s1210_state |
Enumerations | |
enum | ad2s1210_mode { MOD_POS = 0, MOD_VEL, MOD_CONFIG, MOD_RESERVED } |
Functions | |
MODULE_DEVICE_TABLE (spi, ad2s1210_id) | |
module_spi_driver (ad2s1210_driver) | |
MODULE_AUTHOR ("Graff Yang <[email protected]>") | |
MODULE_DESCRIPTION ("Analog Devices AD2S1210 Resolver to Digital SPI driver") | |
MODULE_LICENSE ("GPL v2") | |
#define AD2S1210_DEF_CLKIN 8192000 |
Definition at line 68 of file ad2s1210.c.
#define AD2S1210_DEF_CONTROL 0x7E |
Definition at line 27 of file ad2s1210.c.
#define AD2S1210_DEF_EXCIT 10000 |
Definition at line 71 of file ad2s1210.c.
#define AD2S1210_DEF_TCK (1000000000/AD2S1210_DEF_CLKIN) |
Definition at line 70 of file ad2s1210.c.
#define AD2S1210_ENABLE_HYSTERESIS 0x10 |
Definition at line 32 of file ad2s1210.c.
#define AD2S1210_MAX_CLKIN 10240000 |
Definition at line 61 of file ad2s1210.c.
#define AD2S1210_MAX_EXCIT 20000 |
Definition at line 63 of file ad2s1210.c.
#define AD2S1210_MAX_FCW 0x50 |
Definition at line 65 of file ad2s1210.c.
#define AD2S1210_MIN_CLKIN 6144000 |
Definition at line 60 of file ad2s1210.c.
#define AD2S1210_MIN_EXCIT 2000 |
Definition at line 62 of file ad2s1210.c.
#define AD2S1210_MIN_FCW 0x4 |
Definition at line 64 of file ad2s1210.c.
#define AD2S1210_MSB_IS_HIGH 0x80 |
Definition at line 29 of file ad2s1210.c.
#define AD2S1210_MSB_IS_LOW 0x7F |
Definition at line 30 of file ad2s1210.c.
#define AD2S1210_PHASE_LOCK_RANGE_44 0x20 |
Definition at line 31 of file ad2s1210.c.
#define AD2S1210_PN (AD2S1210_SAA + AD2S1210_RES) |
Definition at line 58 of file ad2s1210.c.
#define AD2S1210_REG_CONTROL 0x92 |
Definition at line 52 of file ad2s1210.c.
#define AD2S1210_REG_DOS_MIS_THRD 0x8A |
Definition at line 46 of file ad2s1210.c.
#define AD2S1210_REG_DOS_OVR_THRD 0x89 |
Definition at line 45 of file ad2s1210.c.
#define AD2S1210_REG_DOS_RST_MAX_THRD 0x8B |
Definition at line 47 of file ad2s1210.c.
#define AD2S1210_REG_DOS_RST_MIN_THRD 0x8C |
Definition at line 48 of file ad2s1210.c.
#define AD2S1210_REG_EXCIT_FREQ 0x91 |
Definition at line 51 of file ad2s1210.c.
#define AD2S1210_REG_FAULT 0xFF |
Definition at line 54 of file ad2s1210.c.
#define AD2S1210_REG_LOS_THRD 0x88 |
Definition at line 44 of file ad2s1210.c.
#define AD2S1210_REG_LOT_HIGH_THRD 0x8D |
Definition at line 49 of file ad2s1210.c.
#define AD2S1210_REG_LOT_LOW_THRD 0x8E |
Definition at line 50 of file ad2s1210.c.
#define AD2S1210_REG_POSITION 0x80 |
Definition at line 42 of file ad2s1210.c.
#define AD2S1210_REG_SOFT_RESET 0xF0 |
Definition at line 53 of file ad2s1210.c.
#define AD2S1210_REG_VELOCITY 0x82 |
Definition at line 43 of file ad2s1210.c.
#define AD2S1210_SAA 3 |
Definition at line 57 of file ad2s1210.c.
#define AD2S1210_SET_ENRES0 0x04 |
Definition at line 34 of file ad2s1210.c.
#define AD2S1210_SET_ENRES1 0x08 |
Definition at line 33 of file ad2s1210.c.
#define AD2S1210_SET_ENRESOLUTION |
Definition at line 38 of file ad2s1210.c.
#define AD2S1210_SET_RES0 0x01 |
Definition at line 36 of file ad2s1210.c.
#define AD2S1210_SET_RES1 0x02 |
Definition at line 35 of file ad2s1210.c.
#define AD2S1210_SET_RESOLUTION (AD2S1210_SET_RES1 | AD2S1210_SET_RES0) |
Definition at line 40 of file ad2s1210.c.
#define DRV_NAME "ad2s1210" |
Definition at line 25 of file ad2s1210.c.
enum ad2s1210_mode |
Definition at line 73 of file ad2s1210.c.
MODULE_AUTHOR | ( | "Graff Yang <[email protected]>" | ) |
MODULE_DEVICE_TABLE | ( | spi | , |
ad2s1210_id | |||
) |
MODULE_LICENSE | ( | "GPL v2" | ) |
module_spi_driver | ( | ad2s1210_driver | ) |