You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
890 B

1 year ago
//////////////////////////////////////////////////////////////////////////
/// COPYRIGHT NOTICE
/// Copyright (c) 2023, 传控科技
/// All rights reserved.
///
/// @file asp_gsensor.c
/// @brief asp_gsensor
///
///(本文件实现的功能的详述)
/// 放置算法 初始化之类的 是bs_xxx型号的gsensor的上层,与型号无关
#include "Asp_gsensor.h"
#include "msp_UART1.h"
#include "msp_iicMx.h"
#include "bsp_msa300.h"
///初始化 调用bsp中的型号
void L2_gsensor_init(u8 d)
{
if (d)
{
L0_IICMx_INIT(D_iicch_MSA,1);
ts_iicm.t0[D_iicch_MSA]= 100;///模拟iic的时候低电平和高电平的时间经常不确定
ts_iicm.t1[D_iicch_MSA]= 100;///使用iic前需要配置iic的速率 根据规格书的要求
L1_msa300_reg_init();
}else
{
LD_gsensor_power(D_PowerMode_suspend|D_gs_LPBW1H9 );///
}
}