File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 8
8
* CONSTANTS
9
9
**************************************************************************************/
10
10
11
- static int const BMP388_CS_PIN = 2 ;
12
- static int const BMP388_INT_PIN = 6 ;
11
+ static int const BMP388_CS_PIN = 2 ;
12
+ static int const BMP388_INT_PIN = 6 ;
13
13
static byte const BMP388_CHIP_ID_REG_ADDR = 0x00 ;
14
14
15
15
static size_t constexpr NUM_THREADS = 20 ;
@@ -82,8 +82,8 @@ byte bmp388_read_reg(byte const reg_addr)
82
82
byte const write_buf[3 ] =
83
83
{
84
84
static_cast <byte>(0x80 | reg_addr), /* REG_ADDR, if MSBit is set -> READ access */
85
- 0 , /* Dummy byte. */
86
- 0 /* REG_VAL is output on SDO */
85
+ 0 , /* Dummy byte. */
86
+ 0 /* REG_VAL is output on SDO */
87
87
};
88
88
byte read_buf[3 ] = {0 };
89
89
@@ -102,7 +102,7 @@ void bmp388_thread_func()
102
102
for (;;)
103
103
{
104
104
/* Sleep between 5 and 500 ms */
105
- rtos::ThisThread::sleep_for (random (5 ,500 ));
105
+ rtos::ThisThread::sleep_for (rtos::Kernel::Clock::duration_u32 ( random (5 ,500 ) ));
106
106
/* Try to read some data from the BMP3888. */
107
107
byte const chip_id = bmp388_read_reg (BMP388_CHIP_ID_REG_ADDR);
108
108
/* Print thread id and chip id value to serial. */
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ void lsm6dsox_thread_func()
81
81
for (;;)
82
82
{
83
83
/* Sleep between 5 and 500 ms */
84
- rtos::ThisThread::sleep_for (random (5 ,500 ));
84
+ rtos::ThisThread::sleep_for (rtos::Kernel::Clock::duration_u32 ( random (5 ,500 ) ));
85
85
/* Try to read some data from the BMP3888. */
86
86
byte const who_am_i = lsm6dsox_read_reg (LSM6DSOX_WHO_AM_I_REG);
87
87
/* Print thread id and chip id value to serial. */
You can’t perform that action at this time.
0 commit comments