Skip to content
Snippets Groups Projects
Commit 7a2a5d3c authored by schneider's avatar schneider
Browse files

fix(max86150): Fix a few register accesses related to averaging

parent a0389189
No related branches found
No related tags found
1 merge request!414SpO2 sensor improvements
......@@ -35,7 +35,7 @@ static const uint8_t MAX86150_FIFOCONTROL2 = 0x0A;
static const uint8_t MAX86150_SYSCONTROL = 0x0D;
static const uint8_t MAX86150_PPGCONFIG1 = 0x0E;
static const uint8_t MAX86150_PPGCONFIG2 = 0x0F;
static const uint8_t MAX86150_LED_PROX_AMP = 0x10;
static const uint8_t MAX86150_PROXINTTHRESH = 0x10;
static const uint8_t MAX86150_LED1_PULSEAMP = 0x11;
static const uint8_t MAX86150_LED2_PULSEAMP = 0x12;
......@@ -44,7 +44,6 @@ static const uint8_t MAX86150_LED_PILOT_PA = 0x15;
static const uint8_t MAX86150_ECG_CONFIG1 = 0x3C;
static const uint8_t MAX86150_ECG_CONFIG3 = 0x3E;
static const uint8_t MAX86150_PROXINTTHRESH = 0x10;
static const uint8_t MAX86150_PARTID = 0xFF;
......@@ -65,7 +64,7 @@ static const uint8_t MAX86150_INT_PROX_INT_MASK = (byte)~0b00010000;
static const uint8_t MAX86150_INT_PROX_INT_ENABLE = 0x10;
static const uint8_t MAX86150_INT_PROX_INT_DISABLE = 0x00;
static const uint8_t MAX86150_SAMPLEAVG_MASK = (byte)~0b00000111;
static const uint8_t MAX86150_SMP_AVE_MASK = (byte)~0b00000111;
static const uint8_t MAX86150_ROLLOVER_MASK = (byte)~0b00010000;
static const uint8_t MAX86150_ROLLOVER_ENABLE = 0b00010000;
......@@ -337,7 +336,7 @@ void max86150_set_led_ir_amplitude(uint8_t amplitude)
void max86150_set_led_proximity_amplitude(uint8_t amplitude)
{
max86150_write_register(
MAX86150_ADDRESS, MAX86150_LED_PROX_AMP, amplitude
MAX86150_ADDRESS, MAX86150_LED_PILOT_PA, amplitude
);
}
......@@ -400,7 +399,7 @@ void max86150_disableSlots(void)
void max86150_set_ppg_averaging(uint8_t numberOfSamples)
{
max86150_bit_mask(
MAX86150_FIFOCONFIG, MAX86150_SAMPLEAVG_MASK, numberOfSamples
MAX86150_PPGCONFIG2, MAX86150_SMP_AVE_MASK, numberOfSamples
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment