STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
main.h File Reference
#include <STAR_ISM330DH.h>
#include <cstdint>
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ISM330_SCLK_PIN   2
#define ISM330_MOSI_PIN   3
#define ISM330_MISO_PIN   16
#define ISM330_CS_PIN   20
#define ISM330_INT1_PIN   21
#define ISM330_INT2_PIN   22
#define ISM330_SPI_HZ   3000000
#define ISM330_ACCEL_FS   ISM_16g
#define ISM330_ACCEL_FS_G   16.0f
#define ISM330_WAKEUP_THRESHOLD_G   2.5f
#define ISM330_WAKEUP_DUR   2
#define ISM330_ROUTE_DRDY_TO_INT1   false

Variables

static constexpr uint8_t ISM330_WKUP_THS

Macro Definition Documentation

◆ ISM330_ACCEL_FS

#define ISM330_ACCEL_FS   ISM_16g

Definition at line 21 of file main.h.

Referenced by setup().

◆ ISM330_ACCEL_FS_G

#define ISM330_ACCEL_FS_G   16.0f

Definition at line 22 of file main.h.

Referenced by setup().

◆ ISM330_CS_PIN

#define ISM330_CS_PIN   20

Definition at line 11 of file main.h.

Referenced by setup().

◆ ISM330_INT1_PIN

#define ISM330_INT1_PIN   21

Definition at line 14 of file main.h.

Referenced by setup().

◆ ISM330_INT2_PIN

#define ISM330_INT2_PIN   22

Definition at line 15 of file main.h.

◆ ISM330_MISO_PIN

#define ISM330_MISO_PIN   16

Definition at line 10 of file main.h.

Referenced by setup().

◆ ISM330_MOSI_PIN

#define ISM330_MOSI_PIN   3

Definition at line 9 of file main.h.

Referenced by setup().

◆ ISM330_ROUTE_DRDY_TO_INT1

#define ISM330_ROUTE_DRDY_TO_INT1   false

Definition at line 31 of file main.h.

Referenced by setup().

◆ ISM330_SCLK_PIN

#define ISM330_SCLK_PIN   2

Definition at line 8 of file main.h.

Referenced by setup().

◆ ISM330_SPI_HZ

#define ISM330_SPI_HZ   3000000

Definition at line 18 of file main.h.

Referenced by ismSpiSettings().

◆ ISM330_WAKEUP_DUR

#define ISM330_WAKEUP_DUR   2

Definition at line 28 of file main.h.

Referenced by setup().

◆ ISM330_WAKEUP_THRESHOLD_G

#define ISM330_WAKEUP_THRESHOLD_G   2.5f

Definition at line 25 of file main.h.

Referenced by setup().

Variable Documentation

◆ ISM330_WKUP_THS

uint8_t ISM330_WKUP_THS
staticconstexpr
Initial value:
= []() -> uint8_t {
constexpr float mgPerLsb = (ISM330_ACCEL_FS_G * 1000.0f) / 64.0f;
float raw = (ISM330_WAKEUP_THRESHOLD_G * 1000.0f) / mgPerLsb;
uint8_t v = (raw > 63.0f) ? 63 : static_cast<uint8_t>(raw);
return (v < 1) ? 1 : v;
}()
#define ISM330_ACCEL_FS_G
Definition main.h:22
#define ISM330_WAKEUP_THRESHOLD_G
Definition main.h:25

Definition at line 34 of file main.h.