29 unsigned int debug =
FALSE;
55 int smpl_ctrl_hi = (options.
dout_rate & 0x0F);
64 int filter_ctrl_lo = (options.
filter_sel & 0x1F);
82 int burst_ctrl2_hi = (options.
accel_bit & 0x01) << 4 |
106 unsigned short rxData;
107 unsigned short retryCount = 3000;
111 }
while ((rxData & 0x0020) == 0x0020 && (retryCount != 0));
113 if (retryCount == 0) {
114 printf(
"\r\n...Error: Filter busy bit did not return to 0b.");
118 #ifdef SPI // Always disable UART_AUTO mode for burst reading when using SPI IF 138 unsigned int debug =
TRUE;
139 printf(
"\r\nRegister Dump:\r\n");
int sensorInitOptions(struct EpsonOptions options)
#define ADDR_BURST_CTRL2_HI
#define EPSON_FILTER_DELAY
#define ADDR_BURST_CTRL1_HI
#define ADDR_SMPL_CTRL_HI
unsigned short registerRead16(unsigned char, unsigned char, unsigned int)
void registerWriteByte(unsigned char, unsigned char, unsigned char, unsigned int)
#define ADDR_UART_CTRL_LO
#define ADDR_FILTER_CTRL_LO
void seDelayMS(uint32_t millis)
#define ADDR_BURST_CTRL1_LO