Da Vinci Firmware 1
Firmware for the DaVinci-M rocket avionics board.
Loading...
Searching...
No Matches

Set / Get power mode of the sensor.

Collaboration diagram for Power mode:

Set / Get power mode of the sensor.

bmp3_set_op_mode

int8_t bmp3_set_op_mode(struct bmp3_settings *settings, struct bmp3_dev *dev);
int8_t bmp3_set_op_mode(struct bmp3_settings *settings, struct bmp3_dev *dev)
This API sets the power mode of the sensor.
Definition bmp3.c:1350
bmp3 device structure
Definition bmp3_defs.h:895
bmp3 device settings
Definition bmp3_defs.h:707
This API sets the power mode of the sensor.
Parameters
[in]settings: Structure instance of bmp3_settings
[in]dev: Structure instance of bmp3_dev.
* ----------------------|-------------------
* dev->settings.op_mode |   Macros
* ----------------------|-------------------
*     0                 | BMP3_MODE_SLEEP
*     1                 | BMP3_MODE_FORCED
*     3                 | BMP3_MODE_NORMAL
* ----------------------|-------------------
*
Note
: Before setting normal mode, valid odr and osr settings should be set in the sensor by using 'bmp3_set_sensor_settings' function.
Returns
Result of API execution status
Return values
0-> Success
>0-> Warning
<0-> Error

bmp3_get_op_mode

int8_t bmp3_get_op_mode(uint8_t *op_mode, const struct bmp3_dev *dev);
int8_t bmp3_get_op_mode(uint8_t *op_mode, struct bmp3_dev *dev)
This API gets the power mode of the sensor.
Definition bmp3.c:1403
This API gets the power mode of the sensor.
Parameters
[in]dev: Structure instance of bmp3_dev.
[out]op_mode: Pointer variable to store the op-mode.
* ------------------------------------------
*   op_mode             |   Macros
* ----------------------|-------------------
*     0                 | BMP3_MODE_SLEEP
*     1                 | BMP3_MODE_FORCED
*     3                 | BMP3_MODE_NORMAL
* ------------------------------------------
*
Returns
Result of API execution status
Return values
0-> Success
>0-> Warning
<0-> Error