-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into auto-manifest-sdk-zephyr-1972
- Loading branch information
Showing
276 changed files
with
11,923 additions
and
1,900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.7.99 | ||
2.7.99-cs1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA. | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#include <zephyr/kernel.h> | ||
#include <zephyr/device.h> | ||
#include <zephyr/drivers/i2c.h> | ||
#include <zephyr/drivers/regulator.h> | ||
#include <zephyr/logging/log.h> | ||
|
||
LOG_MODULE_REGISTER(bmm350_init_minimal, CONFIG_BOARD_LOG_LEVEL); | ||
|
||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(ldsw_sensors), okay) && \ | ||
DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) | ||
|
||
#define LDSW_SENSORS DEVICE_DT_GET(DT_NODELABEL(ldsw_sensors)) | ||
#define BMM350_I2C_DEVICE DEVICE_DT_GET(DT_NODELABEL(i2c2)) | ||
#define BMM350_I2C_ADDRESS 0x14 | ||
|
||
#define BMM350_REG_OTP_CMD_REG 0x50 | ||
#define BMM350_OTP_CMD_PWR_OFF_OTP 0x80 | ||
#define BMM350_START_UP_TIME_FROM_POR 3000 | ||
|
||
static int bmm350_init_minimal(void) | ||
{ | ||
if (regulator_is_enabled(LDSW_SENSORS)) { | ||
k_sleep(K_USEC(BMM350_START_UP_TIME_FROM_POR)); | ||
|
||
/* Turn off the OTP memory on BMM350 to save power */ | ||
return i2c_reg_write_byte(BMM350_I2C_DEVICE, BMM350_I2C_ADDRESS, | ||
BMM350_REG_OTP_CMD_REG, BMM350_OTP_CMD_PWR_OFF_OTP); | ||
} | ||
return 0; | ||
} | ||
|
||
SYS_INIT(bmm350_init_minimal, POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY); | ||
|
||
#endif /* DT_NODE_HAS_STATUS(DT_NODELABEL(ldsw_sensors), okay) && \ | ||
* DT_NODE_HAS_STATUS(DT_NODELABEL(i2c2), okay) | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.