Macros | |
#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) |
#define SCU_BUS_SPI 1 |
SPI bus
#define SCU_BUS_I2C0 2 |
I2C0 bus
#define SCU_BUS_I2C1 3 |
I2C1 bus
#define SCU_BUS_LPADC0 0x10 |
LPADC0
#define SCU_BUS_LPADC1 0x11 |
LPADC1
#define SCU_BUS_LPADC2 0x12 |
LPADC2
#define SCU_BUS_LPADC3 0x13 |
LPADC3
#define SCU_BUS_HPADC0 0x14 |
HPADC1
#define SCU_BUS_HPADC1 0x15 |
HPADC2
#define SCU_INST_SEND | ( | val | ) | ((val) & 0xff) |
Send 1 byte instruction
#define SCU_INST_RECV | ( | n | ) | ((1 << 8) | (((n) - 1) & 0x7) << 12) |
Receive n byte instruction (n: 1 - 8)
#define SCU_INST_LAST (SCU_INST_TERM|SCU_INST_STOP) |
Indicate this instruction is last
#define SEQ_TYPE_NORMAL 0 |
Normal sequencer
#define SEQ_TYPE_DECI 1 |
Decimator
#define SCU_EV_RISE_EN (1 << 31) |
Rise event enable
#define SCU_EV_FALL_EN (1 << 30) |
Fall event enable
#define SCU_EV_OUT8BITS (1 << 29) |
Output only upper 8 bits
#define SCU_EV_OUTALWAYS (0 << SCU_EV_OUTSHIFT) |
Always output to FIFO
#define SCU_EV_OUTSTART (1 << SCU_EV_OUTSHIFT) |
Output start after event occurred
#define SCU_EV_OUTSTOP (2 << SCU_EV_OUTSHIFT) |
Output stop after event occurred
#define SCU_EV_NOTOUT (3 << SCU_EV_OUTSHIFT) |
No output to FIFO
#define SCU_EV_WRITESAMPLES | ( | sample | ) | ((sample) & SCU_EV_WRITESAMPLEMASK) |
Output samples when event occurred
#define SCU_EV_RISE (1) |
Rise (low to high) event occurred
#define SCU_EV_FALL (2) |
Fall (high to low) event occurred
#define SCU_LEVELADJ_X1 (0) |
Level adjustment x1
#define SCU_LEVELADJ_X2 (1) |
Level adjustment x2
#define SCU_LEVELADJ_X4 (2) |
Level adjustment x4
#define SCU_LEVELADJ_X8 (3) |
Level adjustment x8