Added max30101, working, got FIFO working on lsm6dsv16
This commit is contained in:
@@ -59,7 +59,6 @@ void Error_Handler(void);
|
||||
/* Private defines -----------------------------------------------------------*/
|
||||
#define IMU_DRDY_Pin GPIO_PIN_3
|
||||
#define IMU_DRDY_GPIO_Port GPIOC
|
||||
#define IMU_DRDY_EXTI_IRQn EXTI3_IRQn
|
||||
#define CLKIN_ADC_Pin GPIO_PIN_0
|
||||
#define CLKIN_ADC_GPIO_Port GPIOA
|
||||
#define ADC_CS_Pin GPIO_PIN_3
|
||||
@@ -84,7 +83,6 @@ void Error_Handler(void);
|
||||
#define LED3_GPIO_Port GPIOB
|
||||
#define PPG_DRDY_Pin GPIO_PIN_7
|
||||
#define PPG_DRDY_GPIO_Port GPIOC
|
||||
#define PPG_DRDY_EXTI_IRQn EXTI9_5_IRQn
|
||||
#define SD_DETECT_Pin GPIO_PIN_15
|
||||
#define SD_DETECT_GPIO_Port GPIOA
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#include "i2c.h"
|
||||
|
||||
void initialize_max30101(I2C_HandleTypeDef *hi2c1);
|
||||
|
||||
void read_max30101(I2C_HandleTypeDef *hi2c1);
|
||||
@@ -25,43 +25,21 @@ struct packet_vbatt {
|
||||
|
||||
struct packet_imu {
|
||||
uint32_t t;
|
||||
uint16_t readings_cnts[4];
|
||||
uint8_t data[141];
|
||||
};
|
||||
|
||||
struct packet_ekg {
|
||||
struct packet_adc {
|
||||
uint32_t t;
|
||||
uint8_t index;
|
||||
int32_t readings_cnts[50];
|
||||
};
|
||||
|
||||
struct packet_strain {
|
||||
uint32_t t;
|
||||
uint8_t index;
|
||||
int32_t readings_cnts[5];
|
||||
};
|
||||
|
||||
struct packet_outsideT {
|
||||
uint32_t t;
|
||||
uint8_t index;
|
||||
int32_t readings_cnts[5];
|
||||
};
|
||||
|
||||
struct packet_insideT {
|
||||
uint32_t t;
|
||||
uint8_t index;
|
||||
int32_t readings_cnts[5];
|
||||
};
|
||||
|
||||
struct packet_button {
|
||||
uint32_t t;
|
||||
uint8_t button_vec;
|
||||
int32_t ekg_readings_cnts[50];
|
||||
int32_t str_readings_cnts[5];
|
||||
int32_t oT_readings_cnts[5];
|
||||
int32_t iT_readings_cnts[5];
|
||||
};
|
||||
|
||||
struct packet_spo2 {
|
||||
uint32_t t;
|
||||
uint32_t green_cnts[25];
|
||||
uint32_t red_cnts[25];
|
||||
uint32_t ir_cnts[25];
|
||||
uint8_t bytes[180];
|
||||
};
|
||||
|
||||
struct packet_msg {
|
||||
@@ -85,41 +63,21 @@ __inline__ uint8_t typecode<struct packet_vbatt>() {
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_ekg>() {
|
||||
__inline__ uint8_t typecode<struct packet_imu>() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_strain>() {
|
||||
__inline__ uint8_t typecode<struct packet_adc>() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_outsideT>() {
|
||||
__inline__ uint8_t typecode<struct packet_spo2>() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_insideT>() {
|
||||
__inline__ uint8_t typecode<struct packet_msg>() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_button>() {
|
||||
return 7;
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_spo2>() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_imu>() {
|
||||
return 9;
|
||||
}
|
||||
|
||||
template<>
|
||||
__inline__ uint8_t typecode<struct packet_msg>() {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@@ -56,9 +56,10 @@ void DebugMon_Handler(void);
|
||||
void PendSV_Handler(void);
|
||||
void SysTick_Handler(void);
|
||||
void EXTI0_IRQHandler(void);
|
||||
void EXTI3_IRQHandler(void);
|
||||
void DMA1_Channel4_IRQHandler(void);
|
||||
void DMA1_Channel5_IRQHandler(void);
|
||||
void DMA1_Channel6_IRQHandler(void);
|
||||
void DMA1_Channel7_IRQHandler(void);
|
||||
void ADC1_IRQHandler(void);
|
||||
void EXTI9_5_IRQHandler(void);
|
||||
void I2C1_EV_IRQHandler(void);
|
||||
|
||||
Reference in New Issue
Block a user