NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
acceltemp.h File Reference

Go to the source code of this file.

Macros

#define ACC_ADDR   0x6B << 1
 
#define ACCEL_AVERAGE_DEPTH_BITS   0x1F
 
#define ACCEL_CALC_TILT_BIT   0x80
 
#define ACCEL_BUFFER_LENGTH   20
 
#define FUNC_CFG_ACCESS   0x01
 
#define PIN_CTRL   0x02
 
#define DRDY_PULSED_REG   0x0B
 
#define INT1_CTRL   0x0D
 
#define INT2_CTRL   0x0E
 
#define CTRL1_XL   0x10
 
#define CTRL2_G   0x11
 
#define CTRL3_C   0x12
 
#define CTRL4_C   0x13
 
#define CTRL5_C   0x14
 
#define CTRL6_C   0x15
 
#define CTRL7_G   0x16
 
#define CTRL9_C   0x18
 
#define CTRL10_C   0x19
 
#define STATUS_REG   0x1E
 
#define MD1_CFG   0x5E
 
#define OUT_TEMP_L   0x20
 
#define OUTX_L_G   0x22
 
#define OUTX_L_A   0x28
 
#define WHO_AM_I   0x0F
 
#define ISPU_CONFIG   0x02
 
#define ISPU_STATUS   0x04
 
#define ISPU_MEM_SEL   0x08
 
#define ISPU_MEM_ADDR1   0x09
 
#define ISPU_MEM_ADDR0   0x0A
 
#define ISPU_MEM_DATA   0x0B
 
#define ISPU_DOUT_00_L   0x10
 
#define ISPU_INT1_CTRL0   0x50
 
#define ISPU_INT2_CTRL0   0x54
 
#define ISPU_ALGO0   0x70
 
#define IMU_ACC_ENABLED   1
 
#define IMU_GYRO_ENABLED   1<<1
 
#define IMU_ISPU_ENABLED   1<<2
 
#define IMU_TEMP_ENABLED   1<<3
 
#define IMU_ISPU_RST   1<<5
 
#define IMU_RELOAD_ISPU_DATA   1<<6
 
#define IMU_RELOAD_ISPU   1<<7
 
#define NTAN   91
 
#define TEMP_ADDR   0x48 << 1
 
#define T_TEMP_REG   0x00
 
#define T_CONF_REG   0x01
 
#define T_LOW_REG   0x02
 
#define T_HIGH_REG   0x03
 
#define MAX_TEMPR   500
 
#define MIN_TEMPR   100
 

Functions

void sleepAccelerometer (void)
 puts Accelerometer to sleep
 
void initAccelerometer (void)
 Initializes Accelerometer.
 
void updateAccelerometer (void)
 update Accelerometer
 
void sleepTemperature (void)
 puts thermometer to sleep
 
void initTemperature (void)
 initializes thermometer to default configuration
 
void updateTemperature (void)
 Gets temperature reading via I2C.
 
void initDiagnostics (void)
 
void updateDiagnostics (void)
 If disgnostics is enabled, update their entries in the OD.
 
void changeModeIMU (UNS8 mode)
 Changes functional mode of ISM330IS accelerometer.
 

Detailed Description

Date
Created on: Oct 14, 2024
Author
Jerry Ukwela (jeu6@.nosp@m.case.nosp@m..edu)

Definition in file acceltemp.h.

Macro Definition Documentation

◆ ACC_ADDR

#define ACC_ADDR   0x6B << 1

Definition at line 13 of file acceltemp.h.

◆ ACCEL_AVERAGE_DEPTH_BITS

#define ACCEL_AVERAGE_DEPTH_BITS   0x1F

Definition at line 15 of file acceltemp.h.

◆ ACCEL_BUFFER_LENGTH

#define ACCEL_BUFFER_LENGTH   20

Definition at line 17 of file acceltemp.h.

◆ ACCEL_CALC_TILT_BIT

#define ACCEL_CALC_TILT_BIT   0x80

Definition at line 16 of file acceltemp.h.

◆ CTRL10_C

#define CTRL10_C   0x19

Definition at line 34 of file acceltemp.h.

◆ CTRL1_XL

#define CTRL1_XL   0x10

Definition at line 26 of file acceltemp.h.

◆ CTRL2_G

#define CTRL2_G   0x11

Definition at line 27 of file acceltemp.h.

◆ CTRL3_C

#define CTRL3_C   0x12

Definition at line 28 of file acceltemp.h.

◆ CTRL4_C

#define CTRL4_C   0x13

Definition at line 29 of file acceltemp.h.

◆ CTRL5_C

#define CTRL5_C   0x14

Definition at line 30 of file acceltemp.h.

◆ CTRL6_C

#define CTRL6_C   0x15

Definition at line 31 of file acceltemp.h.

◆ CTRL7_G

#define CTRL7_G   0x16

Definition at line 32 of file acceltemp.h.

◆ CTRL9_C

#define CTRL9_C   0x18

Definition at line 33 of file acceltemp.h.

◆ DRDY_PULSED_REG

#define DRDY_PULSED_REG   0x0B

Definition at line 21 of file acceltemp.h.

◆ FUNC_CFG_ACCESS

#define FUNC_CFG_ACCESS   0x01

Definition at line 19 of file acceltemp.h.

◆ IMU_ACC_ENABLED

#define IMU_ACC_ENABLED   1

Definition at line 56 of file acceltemp.h.

◆ IMU_GYRO_ENABLED

#define IMU_GYRO_ENABLED   1<<1

Definition at line 57 of file acceltemp.h.

◆ IMU_ISPU_ENABLED

#define IMU_ISPU_ENABLED   1<<2

Definition at line 58 of file acceltemp.h.

◆ IMU_ISPU_RST

#define IMU_ISPU_RST   1<<5

Definition at line 60 of file acceltemp.h.

◆ IMU_RELOAD_ISPU

#define IMU_RELOAD_ISPU   1<<7

Definition at line 62 of file acceltemp.h.

◆ IMU_RELOAD_ISPU_DATA

#define IMU_RELOAD_ISPU_DATA   1<<6

Definition at line 61 of file acceltemp.h.

◆ IMU_TEMP_ENABLED

#define IMU_TEMP_ENABLED   1<<3

Definition at line 59 of file acceltemp.h.

◆ INT1_CTRL

#define INT1_CTRL   0x0D

Definition at line 23 of file acceltemp.h.

◆ INT2_CTRL

#define INT2_CTRL   0x0E

Definition at line 24 of file acceltemp.h.

◆ ISPU_ALGO0

#define ISPU_ALGO0   0x70

Definition at line 54 of file acceltemp.h.

◆ ISPU_CONFIG

#define ISPU_CONFIG   0x02

Definition at line 44 of file acceltemp.h.

◆ ISPU_DOUT_00_L

#define ISPU_DOUT_00_L   0x10

Definition at line 50 of file acceltemp.h.

◆ ISPU_INT1_CTRL0

#define ISPU_INT1_CTRL0   0x50

Definition at line 52 of file acceltemp.h.

◆ ISPU_INT2_CTRL0

#define ISPU_INT2_CTRL0   0x54

Definition at line 53 of file acceltemp.h.

◆ ISPU_MEM_ADDR0

#define ISPU_MEM_ADDR0   0x0A

Definition at line 48 of file acceltemp.h.

◆ ISPU_MEM_ADDR1

#define ISPU_MEM_ADDR1   0x09

Definition at line 47 of file acceltemp.h.

◆ ISPU_MEM_DATA

#define ISPU_MEM_DATA   0x0B

Definition at line 49 of file acceltemp.h.

◆ ISPU_MEM_SEL

#define ISPU_MEM_SEL   0x08

Definition at line 46 of file acceltemp.h.

◆ ISPU_STATUS

#define ISPU_STATUS   0x04

Definition at line 45 of file acceltemp.h.

◆ MAX_TEMPR

#define MAX_TEMPR   500

Definition at line 73 of file acceltemp.h.

◆ MD1_CFG

#define MD1_CFG   0x5E

Definition at line 37 of file acceltemp.h.

◆ MIN_TEMPR

#define MIN_TEMPR   100

Definition at line 74 of file acceltemp.h.

◆ NTAN

#define NTAN   91

Definition at line 64 of file acceltemp.h.

◆ OUT_TEMP_L

#define OUT_TEMP_L   0x20

Definition at line 39 of file acceltemp.h.

◆ OUTX_L_A

#define OUTX_L_A   0x28

Definition at line 41 of file acceltemp.h.

◆ OUTX_L_G

#define OUTX_L_G   0x22

Definition at line 40 of file acceltemp.h.

◆ PIN_CTRL

#define PIN_CTRL   0x02

Definition at line 20 of file acceltemp.h.

◆ STATUS_REG

#define STATUS_REG   0x1E

Definition at line 35 of file acceltemp.h.

◆ T_CONF_REG

#define T_CONF_REG   0x01

Definition at line 69 of file acceltemp.h.

◆ T_HIGH_REG

#define T_HIGH_REG   0x03

Definition at line 71 of file acceltemp.h.

◆ T_LOW_REG

#define T_LOW_REG   0x02

Definition at line 70 of file acceltemp.h.

◆ T_TEMP_REG

#define T_TEMP_REG   0x00

Definition at line 68 of file acceltemp.h.

◆ TEMP_ADDR

#define TEMP_ADDR   0x48 << 1

Definition at line 67 of file acceltemp.h.

◆ WHO_AM_I

#define WHO_AM_I   0x0F

Definition at line 42 of file acceltemp.h.

Function Documentation

◆ changeModeIMU()

void changeModeIMU ( UNS8 mode)

Changes functional mode of ISM330IS accelerometer.

Parameters
modeMode to configure the IMU into

Definition at line 71 of file acceltemp.c.

Referenced by initAccelerometer(), and processNMTstateChange().

Here is the caller graph for this function:

◆ initAccelerometer()

void initAccelerometer ( void )

Initializes Accelerometer.

Definition at line 119 of file acceltemp.c.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initDiagnostics()

void initDiagnostics ( void )

Definition at line 492 of file acceltemp.c.

◆ initTemperature()

void initTemperature ( void )

initializes thermometer to default configuration

Definition at line 441 of file acceltemp.c.

Referenced by main().

Here is the caller graph for this function:

◆ sleepAccelerometer()

void sleepAccelerometer ( void )

puts Accelerometer to sleep

Definition at line 59 of file acceltemp.c.

Referenced by processNMTstateChange().

Here is the caller graph for this function:

◆ sleepTemperature()

void sleepTemperature ( void )

puts thermometer to sleep

Definition at line 430 of file acceltemp.c.

Referenced by processNMTstateChange().

Here is the caller graph for this function:

◆ updateAccelerometer()

void updateAccelerometer ( void )

update Accelerometer

Definition at line 127 of file acceltemp.c.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDiagnostics()

void updateDiagnostics ( void )

If disgnostics is enabled, update their entries in the OD.

Definition at line 501 of file acceltemp.c.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateTemperature()

void updateTemperature ( void )

Gets temperature reading via I2C.

Definition at line 450 of file acceltemp.c.

Here is the call graph for this function: