Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: USBDevice max32630fthr
Diff: Interfaces/SmartSensor/SSInterface.cpp
- Revision:
- 1:7a55c0c7d6d9
- Parent:
- 0:da5f5b56060a
- Child:
- 5:795cffb6f01a
--- a/Interfaces/SmartSensor/SSInterface.cpp Wed Apr 11 16:01:32 2018 -0700
+++ b/Interfaces/SmartSensor/SSInterface.cpp Wed Apr 11 16:42:37 2018 -0700
@@ -526,8 +526,8 @@
{
assert_msg((data_type >= 0) && (data_type <= 3), "Invalid value for data_type");
uint8_t cmd_bytes[] = { SS_FAM_W_COMMCHAN, SS_CMDIDX_OUTPUTMODE };
- uint8_t data_bytes[] = { (sc_en ? SS_MASK_OUTPUTMODE_SC_EN : 0) |
- ((data_type << SS_SHIFT_OUTPUTMODE_DATATYPE) & SS_MASK_OUTPUTMODE_DATATYPE) };
+ uint8_t data_bytes[] = { (uint8_t)((sc_en ? SS_MASK_OUTPUTMODE_SC_EN : 0) |
+ ((data_type << SS_SHIFT_OUTPUTMODE_DATATYPE) & SS_MASK_OUTPUTMODE_DATATYPE)) };
SS_STATUS status = write_cmd(&cmd_bytes[0], ARRAY_SIZE(cmd_bytes),
&data_bytes[0], ARRAY_SIZE(data_bytes));
@@ -664,7 +664,7 @@
int sample_size;
fifo_sample_size(data_type, &sample_size);
- int bytes_to_read = num_samples * sample_size + 1; //+1 for status byte
+ size_t bytes_to_read = num_samples * sample_size + 1; //+1 for status byte
if (bytes_to_read > sizeof(databuf)) {
//Reduce number of samples to read to fit in buffer
num_samples = (sizeof(databuf) - 1) / sample_size;
Heart Rate SpO2 Algorithm EvKit Health Monitor Development System Board MAXREFDES220