sensor_epsonSpi.h
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // sensor_epsonSpi.h - Epson IMU sensor definitions for SPI interface
4 //
5 //
6 // THE SOFTWARE IS RELEASED INTO THE PUBLIC DOMAIN.
7 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
8 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9 // NONINFRINGEMENT, SECURITY, SATISFACTORY QUALITY, AND FITNESS FOR A
10 // PARTICULAR PURPOSE. IN NO EVENT SHALL EPSON BE LIABLE FOR ANY LOSS, DAMAGE
11 // OR CLAIM, ARISING FROM OR IN CONNECTION WITH THE SOFTWARE OR THE USE OF THE
12 // SOFTWARE.
13 //
14 //==============================================================================
15 #pragma once
16 
17 #include <stdio.h>
18 
19 #include "hcl.h"
20 #include "hcl_gpio.h"
21 #include "hcl_spi.h"
22 #include "sensor_epsonCommon.h"
23 
24 // SPI Interface Timing
25 // TREADRATE = 40 us min, TCYCLERATE @ 0.5MHz = 32 uS, TSTALL must be at least
26 // (40us - 32us) or 20uS which ever is GREATER (20uS)
27 #define EPSON_STALL 20 // Microseconds,
28 #define BURST_STALL1 45 // Microseconds
29 #define BURST_STALL2 4 // Microseconds
30 
31 // Required delay between bus cycles for serial timings
32 #define epsonStall() seDelayMicroSecs(EPSON_STALL)
33 
34 // For delay after issuing Burst Read Cmd
35 #define burstStall1() seDelayMicroSecs(BURST_STALL1)
36 // For delay on consecutive cycles after Burst Read Cmd
37 #define burstStall2() seDelayMicroSecs(BURST_STALL2)
38 
39 #define selEpson() gpioClr(EPSON_CS)
40 #define deselEpson() gpioSet(EPSON_CS)
sensor_epsonCommon.h
hcl_gpio.h
hcl.h
hcl_spi.h


ess_imu_driver
Author(s):
autogenerated on Wed Dec 11 2024 03:06:30