#include <stdint.h>
#include <stdbool.h>
#include <nuttx/fs/ioctl.h>
Go to the source code of this file.
Classes | |
struct | scutimestamp_s |
struct | iir_coeff_s |
struct | iir_filter_s |
struct | math_filter_s |
struct | sensor_event_s |
struct | scuev_arg_s |
struct | scuev_notify_s |
struct | adjust_s |
struct | adjust_xyz_s |
struct | decimation_s |
struct | scufifo_wm_s |
Macros | |
#define | _SCUIOCBASE (0xa000) |
#define | _SCUIOCVALID(c) (_IOC_TYPE(c)==_SCUIOCBASE) |
#define | _SCUIOC(nr) _IOC(_SCUIOCBASE,nr) |
#define | SCUIOC_SETFIFO _SCUIOC(0x0001) |
#define | SCUIOC_FREEFIFO _SCUIOC(0x0002) |
#define | SCUIOC_SETSAMPLE _SCUIOC(0x0003) |
#define | SCUIOC_SETSIGNCONV _SCUIOC(0x0004) |
#define | SCUIOC_SETOGADJUST _SCUIOC(0x0005) |
#define | SCUIOC_CLROGADJUST _SCUIOC(0x0006) |
#define | SCUIOC_SETFILTER _SCUIOC(0x0007) |
#define | SCUIOC_SETNOTIFY _SCUIOC(0x0008) |
#define | SCUIOC_SETELEMENTS _SCUIOC(0x0009) |
#define | SCUIOC_SETDECIMATION _SCUIOC(0x000a) |
#define | SCUIOC_SETWATERMARK _SCUIOC(0x000b) |
#define | SCUIOC_START _SCUIOC(0x0010) |
#define | SCUIOC_STOP _SCUIOC(0x0011) |
#define | SCUIOC_SETFIFOMODE _SCUIOC(0x0012) |
#define | SCUIOC_DELFIFODATA _SCUIOC(0x0013) |
#define | SCU_BUS_SPI 1 |
#define | SCU_BUS_I2C0 2 |
#define | SCU_BUS_I2C1 3 |
#define | SCU_BUS_LPADC0 0x10 |
#define | SCU_BUS_LPADC1 0x11 |
#define | SCU_BUS_LPADC2 0x12 |
#define | SCU_BUS_LPADC3 0x13 |
#define | SCU_BUS_HPADC0 0x14 |
#define | SCU_BUS_HPADC1 0x15 |
#define | SCU_INST_SEND(val) ((val) & 0xff) |
#define | SCU_INST_RECV(n) ((1 << 8) | (((n) - 1) & 0x7) << 12) |
#define | SCU_INST_TERM (1 << 11) |
#define | SCU_INST_RESTART (1 << 10) |
#define | SCU_INST_STOP (1 << 9) |
#define | SCU_INST_LAST (SCU_INST_TERM|SCU_INST_STOP) |
#define | SEQ_TYPE_NORMAL 0 |
#define | SEQ_TYPE_DECI 1 |
#define | SCU_EV_RISE_EN (1 << 31) |
#define | SCU_EV_FALL_EN (1 << 30) |
#define | SCU_EV_OUT8BITS (1 << 29) |
#define | SCU_EV_OUTSHIFT 16 |
#define | SCU_EV_OUTMASK (3 << SCU_EV_OUTSHIFT) |
#define | SCU_EV_OUTALWAYS (0 << SCU_EV_OUTSHIFT) |
#define | SCU_EV_OUTSTART (1 << SCU_EV_OUTSHIFT) |
#define | SCU_EV_OUTSTOP (2 << SCU_EV_OUTSHIFT) |
#define | SCU_EV_NOTOUT (3 << SCU_EV_OUTSHIFT) |
#define | SCU_EV_WRITESAMPLEMASK 0xfff |
#define | SCU_EV_WRITESAMPLES(sample) ((sample) & SCU_EV_WRITESAMPLEMASK) |
#define | SCU_EV_RISE (1) |
#define | SCU_EV_FALL (2) |
#define | SCU_LEVELADJ_X1 (0) |
#define | SCU_LEVELADJ_X2 (1) |
#define | SCU_LEVELADJ_X4 (2) |
#define | SCU_LEVELADJ_X8 (3) |
Enumerations | |
enum | filter_pos_e { FILTER_POS_NONE = 0 , FILTER_POS_AA , FILTER_POS_FF , FILTER_POS_AF , FILTER_POS_EE , FILTER_POS_AE , FILTER_POS_FE } |
Functions | |
struct seq_s * | seq_open (int type, int bustype) |
void | seq_close (struct seq_s *seq) |
int | seq_read (struct seq_s *seq, int fifoid, char *buffer, int length) |
int | seq_ioctl (struct seq_s *seq, int fifoid, int cmd, unsigned long arg) |
int | seq_setinstruction (struct seq_s *seq, const uint16_t *inst, uint16_t nr_insts) |
void | seq_setsample (struct seq_s *seq, uint8_t sample, uint8_t offset, uint8_t elemsize, bool swapbyte) |
void | seq_setaddress (struct seq_s *seq, uint32_t slave_addr) |
int | scu_spitransfer (int slavesel, uint16_t *inst, uint32_t nr_insts, uint8_t *buffer, int len) |
int | scu_i2ctransfer (int port, int slave, uint16_t *inst, uint32_t nr_insts, uint8_t *buffer, int len) |
void | scu_initialize (void) |
void | scu_uninitialize (void) |