mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-19 16:33:20 +08:00
修改了Web后台的部分界面,增加了HAmqtt中的总电量传感器,后台新增mqtt上报频率设置
This commit is contained in:
87
mico-os/libraries/drivers/sensor/BMA2x2/bma2x2_user.h
Normal file
87
mico-os/libraries/drivers/sensor/BMA2x2/bma2x2_user.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file bma2x2_user.h
|
||||
* @author William Xu
|
||||
* @version V1.0.0
|
||||
* @date 21-May-2015
|
||||
* @brief bma2x2 sensor control operations.
|
||||
******************************************************************************
|
||||
* UNPUBLISHED PROPRIETARY SOURCE CODE
|
||||
* Copyright (c) 2016 MXCHIP Inc.
|
||||
*
|
||||
* The contents of this file may not be disclosed to third parties, copied or
|
||||
* duplicated in any form, in whole or in part, without the prior written
|
||||
* permission of MXCHIP Corporation.
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __BMA2x2_USER_H_
|
||||
#define __BMA2x2_USER_H_
|
||||
|
||||
#include "mico_platform.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
/** @addtogroup MICO_Drivers_interface
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup MiCO_Sensor_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup MiCO_BMA2x2_Driver MiCO BMA2x2 Driver
|
||||
* @brief Provide driver interface for BMA2x2 Sensor
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define s16 int16_t
|
||||
#define u32 uint32_t
|
||||
|
||||
#ifndef BMA2x2_I2C_DEVICE
|
||||
#define BMA2x2_I2C_DEVICE MICO_I2C_NONE
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @brief Initialize BMA2X2 sensor device.
|
||||
*
|
||||
* @return kNoErr : on success.
|
||||
* @return kGeneralErr : if an error occurred
|
||||
*/
|
||||
OSStatus bma2x2_sensor_init(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Read data from BMA2X2 sensor device.
|
||||
*
|
||||
* @param v_accel_x_s16: Acceleration of X axis
|
||||
* @param v_accel_y_s16: Acceleration of Y axis
|
||||
* @param v_accel_z_s16: Acceleration of Z axis
|
||||
*
|
||||
* @return kNoErr : on success.
|
||||
* @return kGeneralErr : if an error occurred
|
||||
*/
|
||||
OSStatus bma2x2_data_readout(s16 *v_accel_x_s16, s16 *v_accel_y_s16, s16 *v_accel_z_s16);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Deinitialize BMA2X2 sensor device.
|
||||
*
|
||||
* @return kNoErr : on success.
|
||||
* @return kGeneralErr : if an error occurred
|
||||
*/
|
||||
OSStatus bma2x2_sensor_deinit(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif
|
||||
Reference in New Issue
Block a user