mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-17 15:38:14 +08:00
修复mico-sdk错误
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
NAME := Sensor_BMG160_$(PLATFORM)
|
||||
|
||||
$(NAME)_SOURCES := bmg160_user.c \
|
||||
bmg160.c
|
||||
|
||||
GLOBAL_INCLUDES := .
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
NAME := Sensor_BMG160_$(PLATFORM)
|
||||
|
||||
$(NAME)_SOURCES := bmg160_user.c \
|
||||
bmg160.c
|
||||
|
||||
GLOBAL_INCLUDES := .
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,101 +1,101 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file bmg160_user.h
|
||||
* @author William Xu
|
||||
* @version V1.0.0
|
||||
* @date 21-May-2015
|
||||
* @brief bmg160 sensor control operations.
|
||||
******************************************************************************
|
||||
*
|
||||
* The MIT License
|
||||
* Copyright (c) 2014 MXCHIP Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is furnished
|
||||
* to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef __BMG160_USER_H_
|
||||
#define __BMG160_USER_H_
|
||||
|
||||
#include "mico_platform.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
#define s32 int32_t
|
||||
#define u32 uint32_t
|
||||
|
||||
|
||||
/** @addtogroup MICO_Drivers_interface
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup MiCO_Sensor_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup MiCO_BMG160_Driver MiCO BMG160 Driver
|
||||
* @brief Provide driver interface for BMG160 Sensor
|
||||
* @{
|
||||
*/
|
||||
#ifndef BMG160_I2C_DEVICE
|
||||
#define BMG160_I2C_DEVICE MICO_I2C_NONE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initialize BMG160 sensor device.
|
||||
*
|
||||
* @return kNoErr : on success.
|
||||
* @return kGeneralErr : if an error occurred
|
||||
*/
|
||||
OSStatus bmg160_sensor_init(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Read data from BME280sensor device.
|
||||
*
|
||||
* @param v_gyro_datax_s16 : gyro X data
|
||||
* @param v_gyro_datay_s16 : gyro Y data
|
||||
* @param v_gyro_dataz_s16 : gyro Z data
|
||||
*
|
||||
* @return kNoErr : on success.
|
||||
* @return kGeneralErr : if an error occurred
|
||||
*/
|
||||
OSStatus bmg160_data_readout(s16 *v_gyro_datax_s16, s16 *v_gyro_datay_s16, s16 *v_gyro_dataz_s16);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Deinitialize BMG160 sensor device.
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
OSStatus bmg160_sensor_deinit(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file bmg160_user.h
|
||||
* @author William Xu
|
||||
* @version V1.0.0
|
||||
* @date 21-May-2015
|
||||
* @brief bmg160 sensor control operations.
|
||||
******************************************************************************
|
||||
*
|
||||
* The MIT License
|
||||
* Copyright (c) 2014 MXCHIP Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is furnished
|
||||
* to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef __BMG160_USER_H_
|
||||
#define __BMG160_USER_H_
|
||||
|
||||
#include "mico_platform.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
#define s32 int32_t
|
||||
#define u32 uint32_t
|
||||
|
||||
|
||||
/** @addtogroup MICO_Drivers_interface
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup MiCO_Sensor_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup MiCO_BMG160_Driver MiCO BMG160 Driver
|
||||
* @brief Provide driver interface for BMG160 Sensor
|
||||
* @{
|
||||
*/
|
||||
#ifndef BMG160_I2C_DEVICE
|
||||
#define BMG160_I2C_DEVICE MICO_I2C_NONE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Initialize BMG160 sensor device.
|
||||
*
|
||||
* @return kNoErr : on success.
|
||||
* @return kGeneralErr : if an error occurred
|
||||
*/
|
||||
OSStatus bmg160_sensor_init(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Read data from BME280sensor device.
|
||||
*
|
||||
* @param v_gyro_datax_s16 : gyro X data
|
||||
* @param v_gyro_datay_s16 : gyro Y data
|
||||
* @param v_gyro_dataz_s16 : gyro Z data
|
||||
*
|
||||
* @return kNoErr : on success.
|
||||
* @return kGeneralErr : if an error occurred
|
||||
*/
|
||||
OSStatus bmg160_data_readout(s16 *v_gyro_datax_s16, s16 *v_gyro_datay_s16, s16 *v_gyro_dataz_s16);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Deinitialize BMG160 sensor device.
|
||||
*
|
||||
* @return none
|
||||
*/
|
||||
OSStatus bmg160_sensor_deinit(void);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user