Compare commits
11 Commits
skiing_tmp
...
lmx_skiing
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ecd42b5cf | |||
| d92818a894 | |||
| 3b36715264 | |||
| c398dd9eeb | |||
| 0feb648d11 | |||
| 5a72132d2a | |||
| 2f4e1d7e5b | |||
| 3f02a9f9be | |||
| 6ce9deebe6 | |||
| 96891516b8 | |||
| 52e4b62b53 |
1
Makefile
1
Makefile
@ -628,6 +628,7 @@ c_SRC_FILES := \
|
||||
apps/earphone/xtell_Sensor/sensor/MMC56.c \
|
||||
apps/earphone/xtell_Sensor/sensor/BMP280.c \
|
||||
apps/earphone/xtell_Sensor/sensor/AK8963.c \
|
||||
apps/earphone/xtell_Sensor/sensor/WF282A.c \
|
||||
|
||||
|
||||
# 需要编译的 .S 文件
|
||||
|
||||
@ -266,7 +266,8 @@ u8 gravity_sensor_command(u8 w_chip_id, u8 register_address, u8 function_command
|
||||
// xlog("iic_tx_byte id\n");
|
||||
if (0 == iic_tx_byte(gSensor_info->iic_hdl, w_chip_id)) {
|
||||
ret = 0;
|
||||
xlog("\n gsen iic wr err 0\n");
|
||||
xlog("iic write: I2C NACK on writing ADDR: 0x%X\n", w_chip_id);
|
||||
// xlog("\n gsen iic wr err 0\n");
|
||||
strcpy(&w_log_buffer_1, "gsen iic wr err 0\n");
|
||||
goto __gcend;
|
||||
}
|
||||
@ -316,7 +317,7 @@ u8 _gravity_sensor_get_ndata(u8 r_chip_id, u8 register_address, u8 *buf, u8 data
|
||||
|
||||
iic_start(gSensor_info->iic_hdl);
|
||||
if (0 == iic_tx_byte(gSensor_info->iic_hdl, r_chip_id - 1)) {
|
||||
xlog("I2C NACK on writing ADDR: 0x%X\n", r_chip_id - 1);
|
||||
xlog("iic read: I2C NACK on writing ADDR: 0x%X\n", r_chip_id - 1);
|
||||
read_len = 0;
|
||||
strcpy(&sen_log_buffer_1, "gsen iic rd err 0\n");
|
||||
goto __gdend;
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
//*********************************************************************************//
|
||||
// UART配置 //
|
||||
//*********************************************************************************//
|
||||
// #define TCFG_UART0_ENABLE ENABLE_THIS_MOUDLE //串口打印模块使能
|
||||
#define TCFG_UART0_ENABLE 0 //串口打印模块使能
|
||||
#define TCFG_UART0_RX_PORT NO_CONFIG_PORT //串口接收脚配置(用于打印可以选择NO_CONFIG_PORT)
|
||||
#define TCFG_UART0_ENABLE ENABLE_THIS_MOUDLE //串口打印模块使能
|
||||
// #define TCFG_UART0_ENABLE 0 //串口打印模块使能
|
||||
#define TCFG_UART0_RX_PORT IO_PORT_DM//NO_CONFIG_PORT //串口接收脚配置(用于打印可以选择NO_CONFIG_PORT)
|
||||
#define TCFG_UART0_TX_PORT IO_PORT_DP //串口发送脚配置
|
||||
#define TCFG_UART0_BAUDRATE 1000000 //串口波特率配置
|
||||
// #define TCFG_UART0_BAUDRATE 115200 //串口波特率配置
|
||||
@ -32,8 +32,8 @@
|
||||
// IIC配置 //
|
||||
//*********************************************************************************//
|
||||
/*软件IIC设置*/ //xtell
|
||||
#define TCFG_SW_I2C0_CLK_PORT IO_PORTA_05 //软件IIC CLK脚选择 XTELL
|
||||
#define TCFG_SW_I2C0_DAT_PORT IO_PORTA_06 //软件IIC DAT脚选择
|
||||
#define TCFG_SW_I2C0_CLK_PORT IO_PORTB_04 //软件IIC CLK脚选择 XTELL
|
||||
#define TCFG_SW_I2C0_DAT_PORT IO_PORTB_05 //软件IIC DAT脚选择
|
||||
#define TCFG_SW_I2C0_DELAY_CNT 10 //IIC延时参数,影响通讯时钟频率
|
||||
|
||||
/*硬件IIC端口选择 -- 具体看手册,这里写的不准 -- lmx
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
*/
|
||||
#define TCFG_HW_I2C0_PORTS 'B'
|
||||
#define TCFG_HW_I2C0_CLK 1000000 //硬件IIC波特率:400k
|
||||
#define TCFG_HW_I2C0_CLK 400000 //硬件IIC波特率:400k
|
||||
|
||||
//*********************************************************************************//
|
||||
// 硬件SPI 配置 //
|
||||
@ -791,7 +791,7 @@ DAC硬件上的连接方式,可选的配置:
|
||||
//*********************************************************************************//
|
||||
#define TCFG_LOWPOWER_POWER_SEL PWR_DCDC15 //电源模式设置,可选DCDC和LDO
|
||||
#define TCFG_LOWPOWER_BTOSC_DISABLE 0 //低功耗模式下BTOSC是否保持
|
||||
#define TCFG_LOWPOWER_LOWPOWER_SEL 1 //低功耗使能,蓝牙&&系统空闲可进入低功耗
|
||||
#define TCFG_LOWPOWER_LOWPOWER_SEL 0 //低功耗使能,蓝牙&&系统空闲可进入低功耗
|
||||
#define TCFG_LOWPOWER_VDDIOM_LEVEL VDDIOM_VOL_30V //vddiom等级
|
||||
#define TCFG_LOWPOWER_OSC_TYPE OSC_TYPE_LRC //低功耗晶振类型,btosc/lrc
|
||||
#if (TCFG_AUDIO_ASR_DEVELOP && TCFG_CVP_DEVELOP_ENABLE)
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#include "./sensor/MMC56.h"
|
||||
#include "./sensor/BMP280.h"
|
||||
#include "./sensor/AK8963.h"
|
||||
#include "./sensor/WF282A.h"
|
||||
#include "asm/rtc.h"
|
||||
#include "system/timer.h"
|
||||
#include "adv_time_stamp_setting.h"
|
||||
@ -128,7 +129,7 @@ void sensor_collect_task(void){
|
||||
|
||||
while(1){//4组地磁数据、16组六轴数据、1组气压计数据
|
||||
interval++;
|
||||
mmc5603nj_read_mag_data(&mmc5603nj_buffer);
|
||||
mmc5603nj_read_mag_data(&mmc5603nj_buffer); //地磁的采样率为100Hz,每10ms读一次
|
||||
for(int i = (interval-1)*4; i < interval*4; i++){
|
||||
send_data.sensor_package[i].mmc5603nj_buffer[0] = (int32_t)(mmc5603nj_buffer.x * 1000.0f);
|
||||
send_data.sensor_package[i].mmc5603nj_buffer[1] = (int32_t)(mmc5603nj_buffer.y * 1000.0f);
|
||||
@ -164,10 +165,14 @@ void sensor_collect_task(void){
|
||||
SL_data_index += MPU_FIFO_LEN/4;
|
||||
|
||||
|
||||
if(interval >= 4){
|
||||
if(interval >= 4){ //40ms
|
||||
interval = 0;
|
||||
SL_data_index = 0;
|
||||
bmp280_read_data(&temperature, &pressure);//每40ms读取一次
|
||||
#if BMP280
|
||||
bmp280_read_data(&temperature, &pressure);//每40ms读取一次,高精度的采样率为26.5Hz
|
||||
#else
|
||||
WF_GET_Temperature_Pressure(&temperature, &pressure);
|
||||
#endif
|
||||
for(int i = 0;i<MPU_FIFO_LEN;i++){
|
||||
send_data.sensor_package[i].temperature = (int16_t)(temperature * 1000.0f);
|
||||
send_data.sensor_package[i].pressure = (int32_t)(pressure * 1000.0f);
|
||||
@ -260,14 +265,14 @@ void data_log(uint8_t* data){
|
||||
float pressure = (float)press_raw / 1000.0f;
|
||||
|
||||
// 打印解析后的数据
|
||||
// if(i % 8 == 0){
|
||||
// printf(" ==================ble index: %d\n", *p);
|
||||
// printf("Package[%d]:\n", i);
|
||||
// printf(" ACC(g): x=%.3f, y=%.3f, z=%.3f\n", acc_g[0], acc_g[1], acc_g[2]);
|
||||
// printf(" GYR(dps):x=%.3f, y=%.3f, z=%.3f\n", gyr_dps[0], gyr_dps[1], gyr_dps[2]);
|
||||
// printf(" MAG(Gs): x=%.3f, y=%.3f, z=%.3f\n", mag_gauss[0], mag_gauss[1], mag_gauss[2]);
|
||||
// printf(" TEMP(C): %.3f, PRESS(Pa): %.3f\n", temperature, pressure);
|
||||
// }
|
||||
if(i % 8 == 0){
|
||||
printf(" ==================ble index: %d\n", *p);
|
||||
printf("Package[%d]:\n", i);
|
||||
printf(" ACC(g): x=%.3f, y=%.3f, z=%.3f\n", acc_g[0], acc_g[1], acc_g[2]);
|
||||
printf(" GYR(dps):x=%.3f, y=%.3f, z=%.3f\n", gyr_dps[0], gyr_dps[1], gyr_dps[2]);
|
||||
printf(" MAG(Gs): x=%.3f, y=%.3f, z=%.3f\n", mag_gauss[0], mag_gauss[1], mag_gauss[2]);
|
||||
printf(" TEMP(C): %.3f, PRESS(Pa): %.3f\n", temperature, pressure);
|
||||
}
|
||||
|
||||
}
|
||||
// printf("--- End of Packet ---\n\n");
|
||||
@ -370,36 +375,7 @@ void stop_clloct(void){
|
||||
os_task_del("BLE_send_fuc");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 初始化,在app_main.c的app_main函数被调用
|
||||
*
|
||||
*/
|
||||
void xtell_task_create(void){
|
||||
|
||||
#if TCFG_GSENOR_USER_IIC_TYPE
|
||||
int ret = hw_iic_init(0);
|
||||
xlog("init iic result:%d\n", ret); //返回0成功
|
||||
#else
|
||||
int ret = soft_iic_init(0);
|
||||
int num_chars_written = snprintf(log_buffer_1, sizeof(log_buffer_1),"init iic: %d\n", ret);
|
||||
|
||||
#endif
|
||||
|
||||
// MPU9250_Mag_Init();
|
||||
//iic总线设备扫描
|
||||
// extern void i2c_scanner_probe(void);
|
||||
// i2c_scanner_probe();
|
||||
|
||||
xlog("xtell_task_create\n");
|
||||
|
||||
circle_buffer_init(&g_ble_send_cb, g_sensor_data_storage, SENSOR_DATA_BUFFER_SIZE, sizeof(ble_send_data_t));
|
||||
|
||||
os_sem_create(&receiver_ready_sem, 0);
|
||||
|
||||
extern void test_uart_init(void);
|
||||
test_uart_init();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@ -430,7 +406,38 @@ void uartSendData(void *buf, u16 len) //发送数据的接口。
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @brief 初始化,在xtell_app_main.c的app_main函数被调用
|
||||
*
|
||||
*/
|
||||
void xtell_task_create(void){
|
||||
|
||||
#if TCFG_GSENOR_USER_IIC_TYPE
|
||||
int ret = hw_iic_init(0);
|
||||
xlog("init iic result:%d\n", ret); //返回0成功
|
||||
#else
|
||||
int ret = soft_iic_init(0);
|
||||
// int num_chars_written = snprintf(log_buffer_1, sizeof(log_buffer_1),"init iic: %d\n", ret);
|
||||
|
||||
#endif
|
||||
|
||||
// MPU9250_Mag_Init();
|
||||
//iic总线设备扫描
|
||||
// extern void i2c_scanner_probe(void);
|
||||
// i2c_scanner_probe();
|
||||
|
||||
xlog("xtell_task_create\n");
|
||||
|
||||
circle_buffer_init(&g_ble_send_cb, g_sensor_data_storage, SENSOR_DATA_BUFFER_SIZE, sizeof(ble_send_data_t));
|
||||
|
||||
os_sem_create(&receiver_ready_sem, 0);
|
||||
|
||||
extern void test_uart_init(void);
|
||||
test_uart_init();
|
||||
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//test
|
||||
//
|
||||
|
||||
@ -441,59 +448,14 @@ static OS_SEM ble_send_sem;
|
||||
|
||||
|
||||
int j = 0;
|
||||
void data_send_task(void){
|
||||
signed short accx_buf[100];
|
||||
signed short accy_buf[100];
|
||||
signed short accz_buf[100];
|
||||
signed short gyrx_buf[100];
|
||||
signed short gyry_buf[100];
|
||||
signed short gyrz_buf[100];
|
||||
SL_SC7U22_FIFO_Read(accx_buf,accy_buf,accz_buf,gyrx_buf,gyry_buf,gyrz_buf); //一次性读取内置fifo的数据
|
||||
|
||||
#if 1
|
||||
// 定义新的Packet ID和数据长度
|
||||
#define PACKET_ID_RAW_IMU 0x04
|
||||
#define PACKET_LENGTH_RAW_IMU 12 // 6个传感器值,每个2字节
|
||||
|
||||
// 声明一个发送缓冲区,用于包含帧头、ID、长度、数据和校验和
|
||||
// 帧头 (2) + ID (1) + 长度 (1) + 数据 (12) + 校验和 (1) = 17 字节
|
||||
uint8_t tx_buffer[2 + 1 + 1 + PACKET_LENGTH_RAW_IMU + 1];
|
||||
uint8_t checksum = 0;
|
||||
int i; // 用于循环计算校验和
|
||||
|
||||
// 填充帧头
|
||||
tx_buffer[0] = 0xAA;
|
||||
tx_buffer[1] = 0xFF;
|
||||
|
||||
// 填充Packet ID和长度
|
||||
tx_buffer[2] = PACKET_ID_RAW_IMU;
|
||||
tx_buffer[3] = PACKET_LENGTH_RAW_IMU;
|
||||
|
||||
// 填充原始传感器数据 (与你原先的processing_data内容相同)
|
||||
tx_buffer[4] = (uint8_t)(accx_buf[0] & 0xFF); // accX LSB
|
||||
tx_buffer[5] = (uint8_t)(accx_buf[0] >> 8 & 0xFF); // accX MSB
|
||||
tx_buffer[6] = (uint8_t)(accy_buf[0] & 0xFF); // accY LSB
|
||||
tx_buffer[7] = (uint8_t)(accy_buf[0] >> 8 & 0xFF); // accY MSB
|
||||
tx_buffer[8] = (uint8_t)(accz_buf[0] & 0xFF); // accZ LSB
|
||||
tx_buffer[9] = (uint8_t)(accz_buf[0] >> 8 & 0xFF); // accZ MSB
|
||||
tx_buffer[10] = (uint8_t)(gyrx_buf[0] & 0xFF); // gyrX LSB
|
||||
tx_buffer[11] = (uint8_t)(gyrx_buf[0] >> 8 & 0xFF); // gyrX MSB
|
||||
tx_buffer[12] = (uint8_t)(gyry_buf[0] & 0xFF); // gyrY LSB
|
||||
tx_buffer[13] = (uint8_t)(gyry_buf[0] >> 8 & 0xFF); // gyrY MSB
|
||||
tx_buffer[14] = (uint8_t)(gyrz_buf[0] & 0xFF); // gyrZ LSB
|
||||
tx_buffer[15] = (uint8_t)(gyrz_buf[0] >> 8 & 0xFF); // gyrZ MSB
|
||||
|
||||
// 计算校验和 (从 Packet ID 到所有数据字节的和)
|
||||
checksum = tx_buffer[2] + tx_buffer[3]; // ID + Length
|
||||
for (i = 0; i < PACKET_LENGTH_RAW_IMU; i++) {
|
||||
checksum += tx_buffer[4 + i]; // 加上所有数据字节
|
||||
void sensor_test_task(void){
|
||||
float temperature = 0;
|
||||
float pressure = 0;
|
||||
while(1){
|
||||
WF_GET_Temperature_Pressure(&temperature, &pressure);
|
||||
xlog("temperature: %.3f,pressure: %.3f\n",temperature,pressure);
|
||||
os_time_dly(100);
|
||||
}
|
||||
tx_buffer[4 + PACKET_LENGTH_RAW_IMU] = checksum; // 校验和是最后一个字节
|
||||
|
||||
// 发送整个缓冲区
|
||||
extern void uartSendData(void *buf, u16 len) ; // 确保u16是uint16_t或unsigned short
|
||||
uartSendData(tx_buffer, sizeof(tx_buffer)); // 发送总共17字节
|
||||
#endif
|
||||
|
||||
}
|
||||
static u16 gtest_id = 0;
|
||||
@ -509,12 +471,16 @@ void test_func(void){
|
||||
acc_data_buf[i] = i;
|
||||
}
|
||||
|
||||
SL_SC7U22_Config();
|
||||
mmc5603nj_init();
|
||||
bmp280_init();
|
||||
os_task_create(BLE_send_fuc,NULL,5,1024,32,"BLE_send_fuc");
|
||||
os_task_create(sensor_collect_task,NULL,5,1024,32,"sensor_collect_task");
|
||||
// create_process(&test_id, "sensor_test",NULL,data_send_task ,3);
|
||||
// SL_SC7U22_Config();
|
||||
// mmc5603nj_init();
|
||||
#if BMP280
|
||||
BMP280_init();
|
||||
#else
|
||||
WF_Init();
|
||||
#endif
|
||||
// os_task_create(BLE_send_fuc,NULL,5,1024,32,"BLE_send_fuc");
|
||||
// os_task_create(sensor_collect_task,NULL,5,1024,32,"sensor_collect_task");
|
||||
os_task_create(sensor_test_task,NULL,5,1024,32,"sensor_test");
|
||||
// data_send_task();
|
||||
}
|
||||
|
||||
|
||||
@ -51,6 +51,7 @@ static uint8_t bmp280_read_regs(uint8_t reg, uint8_t *buf, uint16_t len) {
|
||||
* @return 补偿后的温度值 (单位: °C)
|
||||
*/
|
||||
static float compensate_temperature(int32_t adc_T) {
|
||||
#if 1
|
||||
float var1, var2, temperature;
|
||||
|
||||
var1 = (((float)adc_T) / 16384.0f - ((float)t1) / 1024.0f) * ((float)t2);
|
||||
@ -64,6 +65,16 @@ static float compensate_temperature(int32_t adc_T) {
|
||||
if (temperature > 85.0f) return 85.0f;
|
||||
|
||||
return temperature;
|
||||
#else
|
||||
int32_t var1, var2, T;
|
||||
var1 = ((((adc_T>>3) - ((int32_t)t1<<1))) * ((int32_t)t2)) >> 11;
|
||||
var2 = (((((adc_T>>4) - ((int32_t)t1)) * ((adc_T>>4) - ((int32_t)t1))) >> 12) *
|
||||
((int32_t)t3)) >> 14;
|
||||
t_fine = var1 + var2;
|
||||
T = (t_fine * 5 + 128) >> 8;
|
||||
return (float)(T/100.0f);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,6 +83,7 @@ static float compensate_temperature(int32_t adc_T) {
|
||||
* @return 补偿后的气压值 (单位: Pa)
|
||||
*/
|
||||
static float compensate_pressure(int32_t adc_P) {
|
||||
#if 1
|
||||
float var1, var2, pressure;
|
||||
|
||||
var1 = ((float)t_fine / 2.0f) - 64000.0f;
|
||||
@ -95,6 +107,25 @@ static float compensate_pressure(int32_t adc_P) {
|
||||
if (pressure > 110000.0f) return 110000.0f;
|
||||
|
||||
return pressure;
|
||||
#else
|
||||
int32_t var1, var2, p;
|
||||
var1 = ((int32_t)t_fine) - 128000;
|
||||
var2 = var1 * var1 * (int32_t)p6;
|
||||
var2 = var2 + ((var1*(int32_t)p5)<<17);
|
||||
var2 = var2 + (((int32_t)p4)<<35);
|
||||
var1 = ((var1 * var1 * (int32_t)p3)>>8) + ((var1 * (int32_t)p2)<<12);
|
||||
var1 = (((((int32_t)1)<<47)+var1))*((int32_t)p1)>>33;
|
||||
if (var1 == 0)
|
||||
{
|
||||
return 0; // avoid exception caused by division by zero
|
||||
}
|
||||
p = 1048576-adc_P;
|
||||
p = (((p<<31)-var2)*3125)/var1;
|
||||
var1 = (((int32_t)p9) * (p>>13) * (p>>13)) >> 25;
|
||||
var2 = (((int32_t)p8) * p) >> 19;
|
||||
p = ((p + var1 + var2) >> 8) + (((int32_t)p9)<<4);
|
||||
return (float)(p/256);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*==================================================================================*/
|
||||
@ -104,18 +135,18 @@ static float compensate_pressure(int32_t adc_P) {
|
||||
|
||||
|
||||
|
||||
uint8_t bmp280_init(void) {
|
||||
uint8_t BMP280_init(void) {
|
||||
uint8_t id;
|
||||
uint8_t calib_data[24];
|
||||
|
||||
// 1. 检查芯片ID
|
||||
if (bmp280_read_regs(BMP280_REG_ID, &id, 1) == 0) {
|
||||
printf("bmp280 get id error:%d\n",id );
|
||||
return 1; // I2C读取失败
|
||||
// return 1; // I2C读取失败
|
||||
}
|
||||
if (id != 0x58) {
|
||||
printf("bmp280 check diff:%d\n",id );
|
||||
return 1; // ID不匹配
|
||||
// return 1; // ID不匹配
|
||||
}
|
||||
printf("bmp280 get id:0%X\n",id );
|
||||
|
||||
|
||||
@ -8,11 +8,11 @@
|
||||
|
||||
// I2C 从设备地址
|
||||
#if BMP_PULL_UP == 1 //外部接的高
|
||||
#define BMP_IIC_7BIT_ADDRESS 0x76 //7位,外部接高为0x77
|
||||
#define BMP_IIC_7BIT_ADDRESS 0x76 //7位,外部接高低为0x76
|
||||
#define BMP_IIC_WRITE_ADDRESS (BMP_IIC_7BIT_ADDRESS<<1) //8位地址
|
||||
#define BMP_IIC_READ_ADDRESS (BMP_IIC_WRITE_ADDRESS | 0x01)
|
||||
#else
|
||||
#define BMP_IIC_7BIT_ADDRESS 0x77 //7位,外部接低为0x76
|
||||
#define BMP_IIC_7BIT_ADDRESS 0x77 //7位,外部接GAO为0x77
|
||||
#define BMP_IIC_WRITE_ADDRESS (BMP_IIC_7BIT_ADDRESS<<1) //8位地址
|
||||
#define BMP_IIC_READ_ADDRESS (BMP_IIC_WRITE_ADDRESS | 0x01)
|
||||
#endif
|
||||
@ -33,7 +33,7 @@
|
||||
* @return 0: 成功, 1: 芯片ID错误, 2: 读取校准参数失败
|
||||
* @note 此函数会完成ID检查、软复位、读取校准参数,并设置传感器为连续测量模式。
|
||||
*/
|
||||
uint8_t bmp280_init(void);
|
||||
uint8_t BMP280_init(void);
|
||||
|
||||
/**
|
||||
* @brief 从BMP280读取温度和气压数据
|
||||
|
||||
@ -3,171 +3,225 @@
|
||||
*/
|
||||
#include "wf282a.h"
|
||||
#include <math.h>
|
||||
#include <stdint.h> // 推荐使用标准类型
|
||||
#include "gSensor/gSensor_manage.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include "gSensor/gSensor_manage.h" // Assuming this provides gravity_sensor_command and _gravity_sensor_get_ndata
|
||||
#define ENABLE_XLOG 1
|
||||
#ifdef xlog
|
||||
#undef xlog
|
||||
#endif
|
||||
#if ENABLE_XLOG
|
||||
#define xlog(format, ...) printf("[XT:%s] " format, __func__, ##__VA_ARGS__)
|
||||
#else
|
||||
#define xlog(format, ...) ((void)0)
|
||||
#endif
|
||||
/*==================================================================================*/
|
||||
/* WF282A 内部定义 */
|
||||
/*==================================================================================*/
|
||||
|
||||
// 存储校准系数的静态全局变量
|
||||
static int16_t c0, c1, c01, c11, c20, c21, c30;
|
||||
static int32_t c00, c10;
|
||||
|
||||
/*==================================================================================*/
|
||||
/* 封装的底层I2C读写函数 */
|
||||
/* 封装的底层I2C读写函数 (Provided by user) */
|
||||
/*==================================================================================*/
|
||||
|
||||
#define I2C_HANDLE 0
|
||||
/**
|
||||
* @brief 写入单个字节到WF282A寄存器
|
||||
*/
|
||||
static void wf282a_write_reg(uint8_t reg, uint8_t data) {
|
||||
|
||||
gravity_sensor_command(WF_IIC_WRITE_ADDRESS, reg, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 从WF282A读取多个字节
|
||||
*/
|
||||
static uint32_t wf282a_read_regs(uint8_t reg, uint8_t *buf, uint8_t len) {
|
||||
|
||||
return _gravity_sensor_get_ndata(WF_IIC_READ_ADDRESS, reg, buf, len);
|
||||
}
|
||||
|
||||
|
||||
/*==================================================================================*/
|
||||
/* 内部辅助函数 */
|
||||
/*==================================================================================*/
|
||||
|
||||
/**
|
||||
* @brief 从缓冲区中解析所有校准系数
|
||||
* @param buf 包含从寄存器0x10开始读取的18个字节的校准数据
|
||||
*/
|
||||
static void parse_calibration_data(const uint8_t *buf) {
|
||||
// c0 (12-bit)
|
||||
c0 = ((int16_t)buf[0] << 4) | (buf[1] >> 4);
|
||||
if (c0 & (1 << 11)) c0 |= 0xF000;
|
||||
// 制造商: (tempbuf[0]<<4) + ((tempbuf[1]>>4) & 0x0F);
|
||||
c0 = ((int16_t)buf[0] << 4) | ((buf[1] >> 4) & 0x0F);
|
||||
// if (c0 & (1 << 11)) c0 |= 0xF000;
|
||||
if(c0 > 0x7ff) c0 = c0 - 0x1000;
|
||||
|
||||
// c1 (12-bit)
|
||||
// 制造商: tempbuf[2] + ((tempbuf[1] & 0x0F)<<8);
|
||||
c1 = (((int16_t)buf[1] & 0x0F) << 8) | buf[2];
|
||||
if (c1 & (1 << 11)) c1 |= 0xF000;
|
||||
// if (c1 & (1 << 11)) c1 |= 0xF000;
|
||||
if(c1 > 0x7ff) c1 = c1 -0x1000;
|
||||
|
||||
// c00 (20-bit)
|
||||
c00 = ((int32_t)buf[3] << 12) | ((int32_t)buf[4] << 4) | (buf[5] >> 4);
|
||||
if (c00 & (1 << 19)) c00 |= 0xFFF00000;
|
||||
// 制造商: (((u32)((tempbuf[3]<<8) + tempbuf[4]))<<4)+((tempbuf[5]>>4)&0x0F);
|
||||
c00 = ((int32_t)buf[3] << 12) | ((int32_t)buf[4] << 4) | ((buf[5] >> 4) & 0x0F);
|
||||
// if (c00 & (1 << 19)) c00 |= 0xFFF00000;
|
||||
if(c00 > 0x7ffff) c00 = c00 - 0x100000;
|
||||
|
||||
// c10 (20-bit)
|
||||
// 制造商: (((u32)((tempbuf[5]&0x0F)<<8)+tempbuf[6])<<8)+tempbuf[7];
|
||||
c10 = (((int32_t)buf[5] & 0x0F) << 16) | ((int32_t)buf[6] << 8) | buf[7];
|
||||
if (c10 & (1 << 19)) c10 |= 0xFFF00000;
|
||||
// if (c10 & (1 << 19)) c10 |= 0xFFF00000;
|
||||
if(c10 > 0x7ffff) c10 = c10 - 0x100000;
|
||||
|
||||
// c01, c11, c20, c21, c30 (16-bit)
|
||||
c01 = (int16_t)((uint16_t)buf[8] << 8 | buf[9]);
|
||||
if (c01 > 0x7fff) c01 = c01 - 0x10000; // 制造商的符号扩展
|
||||
c11 = (int16_t)((uint16_t)buf[10] << 8 | buf[11]);
|
||||
if (c11 > 0x7fff) c11 = c11 - 0x10000; // 制造商的符号扩展
|
||||
c20 = (int16_t)((uint16_t)buf[12] << 8 | buf[13]);
|
||||
if (c20 > 0x7fff) c20 = c20 - 0x10000; // 制造商的符号扩展
|
||||
c21 = (int16_t)((uint16_t)buf[14] << 8 | buf[15]);
|
||||
if (c21 > 0x7fff) c21 = c21 - 0x10000; // 制造商的符号扩展
|
||||
c30 = (int16_t)((uint16_t)buf[16] << 8 | buf[17]);
|
||||
if (c30 > 0x7fff) c30 = c30 - 0x10000; // 制造商的符号扩展
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取原始温度值 (ADC)
|
||||
* 在连续测量模式下,只需读取数据寄存器,无需触发或等待。
|
||||
*/
|
||||
static int32_t Get_Traw() {
|
||||
uint8_t buff[3];
|
||||
int32_t Traw;
|
||||
// 从 MSB 寄存器 WF_TMP_B2 (0x03) 开始连续读取3个字节
|
||||
wf282a_read_regs(WF_TMP_B2, buff, 3);
|
||||
if (wf282a_read_regs(WF_TMP_B2, buff, 3) != 3) {
|
||||
xlog("Failed to read raw temperature data\n");
|
||||
return 0; // 返回0或一个合适的错误值
|
||||
}
|
||||
// buff[0] = B2 (MSB), buff[1] = B1, buff[2] = B0 (LSB)
|
||||
Traw = (int32_t)buff[0] << 16 | (int32_t)buff[1] << 8 | (int32_t)buff[2];
|
||||
// 24位二进制补码转32位
|
||||
if (Traw & (1 << 23)) {
|
||||
Traw |= 0xFF000000;
|
||||
}
|
||||
// if (Traw & (1 << 23)) {
|
||||
// Traw |= 0xFF000000;
|
||||
// }
|
||||
if(Traw > 0x7fffff) Traw = Traw - 0x1000000;
|
||||
return Traw;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 获取原始气压值 (ADC)
|
||||
* 在连续测量模式下,只需读取数据寄存器,无需触发或等待。
|
||||
*/
|
||||
static int32_t Get_Praw() {
|
||||
uint8_t buff[3];
|
||||
int32_t Praw;
|
||||
// 从 MSB 寄存器 WF_PRS_B2 (0x00) 开始连续读取3个字节
|
||||
wf282a_read_regs(WF_PRS_B2, buff, 3);
|
||||
if (wf282a_read_regs(WF_PRS_B2, buff, 3) != 3) {
|
||||
xlog("Failed to read raw pressure data\n");
|
||||
return 0; // 返回0或一个合适的错误值
|
||||
}
|
||||
// buff[0] = B2 (MSB), buff[1] = B1, buff[2] = B0 (LSB)
|
||||
Praw = (int32_t)buff[0] << 16 | (int32_t)buff[1] << 8 | (int32_t)buff[2];
|
||||
// 24位二进制补码转32位
|
||||
if (Praw & (1 << 23)) {
|
||||
Praw |= 0xFF000000;
|
||||
}
|
||||
// // 24位二进制补码转32位
|
||||
// if (Praw & (1 << 23)) {
|
||||
// Praw |= 0xFF000000;
|
||||
// }
|
||||
if(Praw > 0x7fffff) Praw = Praw - 0x1000000;
|
||||
return Praw;
|
||||
}
|
||||
|
||||
/*==================================================================================*/
|
||||
/* 4. 外部接口函数实现 */
|
||||
/*==================================================================================*/
|
||||
|
||||
uint8_t WF_Init() {
|
||||
uint8_t calib_buf[18];
|
||||
uint8_t check_cfg;
|
||||
xlog("WF282A: soft reset\n");
|
||||
// 1. 软复位
|
||||
// wf282a_write_reg(WF_RESET_REG, 0x09);//0x0C
|
||||
delay(1000); // 复位后等待1000ms
|
||||
|
||||
// 1. 配置传感器工作模式
|
||||
// 推荐配置:压力8次过采样,温度1次过采样,测量速率16Hz
|
||||
wf282a_write_reg(WF_PRS_CFG, (PM_RATE_16 << 4) | PM_PRC_8);
|
||||
wf282a_write_reg(WF_TMP_CFG, (TMP_RATE_16 << 4) | TMP_PRC_1 | TMP_INT_SENSOR);
|
||||
wf282a_write_reg(WF_MEAS_CFG, 0x07); // 启动连续压力和温度测量
|
||||
wf282a_write_reg(WF_CFG_REG, 0x00); // 无中断或FIFO移位配置
|
||||
// 读取设备id,确保设备通信正常
|
||||
extern uint8_t WF_GetID();
|
||||
WF_GetID();
|
||||
|
||||
// 2. 一次性读取所有校准系数 (从0x10到0x21,共18字节)
|
||||
if (wf282a_read_regs(COEF_C0, calib_buf, 18) != 0) {
|
||||
// 2. 读取校准系数
|
||||
if (wf282a_read_regs(COEF_C0, calib_buf, 18) != 18) { //0x10, 检查是否成功读取18字节
|
||||
xlog("Failed to read the calibration coefficient\n");
|
||||
return 2; // 读取校准数据失败
|
||||
}
|
||||
parse_calibration_data(calib_buf);
|
||||
// DEBUG: 打印解析后的校准系数
|
||||
xlog("Parsed Coefficients: c0=%d, c1=%d, c00=%ld, c10=%ld, c01=%d, c11=%d, c20=%d, c21=%d, c30=%d\n",
|
||||
c0, c1, c00, c10, c01, c11, c20, c21, c30);
|
||||
|
||||
// 3. 检查配置是否写入成功
|
||||
wf282a_read_regs(WF_MEAS_CFG, &check_cfg, 1);
|
||||
if (check_cfg != 0x07) {
|
||||
return 1; // 错误
|
||||
} else {
|
||||
return 0; // 成功
|
||||
}
|
||||
#if 0 //连续测量
|
||||
// 配置压力、温度和通用寄存器为连续测量模式
|
||||
wf282a_write_reg(WF_PRS_CFG, (PM_RATE_32 << 4) | PM_PRC_1); //reg: 0x06
|
||||
// 温度配置: 内部传感器 (TMP_INT_SENSOR), 32Hz测量速率 (TMP_RATE_32), 16x过采样 (TMP_PRC_16) -> 0x54
|
||||
wf282a_write_reg(WF_TMP_CFG, TMP_EXT_SENSOR | (TMP_RATE_32 << 4) | TMP_PRC_1); //reg: 0x07
|
||||
// 启动连续测量模式 (同时测量压力和温度)
|
||||
wf282a_write_reg(WF_MEAS_CFG, 0x06); //reg: 0x08
|
||||
//过采样率大于8要对移位置配置1
|
||||
// wf282a_write_reg(WF_CFG_REG, 0x0C); //reg: 0x09
|
||||
delay(40); // 稍长一点的延迟,确保传感器开始正常工作
|
||||
#else
|
||||
|
||||
wf282a_write_reg(WF_PRS_CFG, (PM_RATE_1 << 4) | PM_PRC_128); //reg: 0x06,压力
|
||||
wf282a_write_reg(WF_TMP_CFG, TMP_EXT_SENSOR | (TMP_RATE_1 << 4) | TMP_PRC_128); //reg: 0x07,温度
|
||||
//过采样率大于8要对移位置配置1
|
||||
wf282a_write_reg(WF_CFG_REG, 0x0C); //reg: 0x09
|
||||
delay(40); // 稍长一点的延迟,确保传感器开始正常工作
|
||||
#endif
|
||||
|
||||
return 0; // 成功
|
||||
}
|
||||
|
||||
void WF_Sleep() {
|
||||
wf282a_write_reg(WF_MEAS_CFG, 0x00); // 待机模式
|
||||
}
|
||||
|
||||
void WF_Wakeup() {
|
||||
wf282a_write_reg(WF_MEAS_CFG, 0x07); // 恢复连续测量
|
||||
// 恢复连续测量模式
|
||||
wf282a_write_reg(WF_MEAS_CFG, 0x06); // 启动连续压力和温度测量
|
||||
delay(40); // 恢复后等待一个测量周期
|
||||
}
|
||||
|
||||
uint8_t WF_GetID() {
|
||||
uint8_t id;
|
||||
wf282a_read_regs(WF_ID_REG, &id, 1);
|
||||
if (wf282a_read_regs(WF_ID_REG, &id, 1) != 1) {
|
||||
xlog("Failed to read chip ID\n");
|
||||
return 0; // 返回0或一个合适的错误值
|
||||
}
|
||||
xlog("wf get id : %d\n", id);
|
||||
return id;
|
||||
}
|
||||
|
||||
float WF_Temperature_Calculate() {
|
||||
float Traw_sc;
|
||||
int32_t Traw = Get_Traw();
|
||||
|
||||
Traw_sc = (float)Traw / KT; // 缩放原始温度值
|
||||
return (float)c0 * 0.5f + (float)c1 * Traw_sc;
|
||||
}
|
||||
|
||||
float WF_Pressure_Calculate() {
|
||||
float Traw_sc, Praw_sc, Pcomp;
|
||||
//外部调用
|
||||
void WF_GET_Temperature_Pressure(float* temperature, float* precessure){
|
||||
#if 0 //连续测量模式
|
||||
int32_t Traw = Get_Traw();
|
||||
xlog("DEBUG: Traw = %ld\n", Traw);
|
||||
delay(5);
|
||||
int32_t Praw = Get_Praw();
|
||||
xlog("DEBUG: Praw = %ld\n", Praw);
|
||||
#else //单次测量
|
||||
wf282a_write_reg(WF_MEAS_CFG, 0x02); //内部进行一次温度测量
|
||||
delay(500);
|
||||
int32_t Traw = Get_Traw();
|
||||
xlog("DEBUG: Traw = %ld\n", Traw);
|
||||
wf282a_write_reg(WF_MEAS_CFG, 0x01); //内部进行一次压力测量
|
||||
delay(500);
|
||||
int32_t Praw = Get_Praw();
|
||||
xlog("DEBUG: Praw = %ld\n", Praw);
|
||||
|
||||
Traw_sc = (float)Traw / KT; // 缩放原始温度值
|
||||
Praw_sc = (float)Praw / KP; // 缩放原始压力值
|
||||
#endif
|
||||
|
||||
// 公式: 手册给出
|
||||
Pcomp = (float)c00
|
||||
+ Praw_sc * ((float)c10 + Praw_sc * ((float)c20 + Praw_sc * (float)c30))
|
||||
+ Traw_sc * (float)c01
|
||||
+ Traw_sc * Praw_sc * ((float)c11 + Praw_sc * (float)c21);
|
||||
|
||||
return Pcomp;
|
||||
float Traw_sc = (float)Traw / KT; // 缩放原始温度值
|
||||
double Praw_sc = (double)Praw / KP; // 缩放原始压力值
|
||||
double precessure_tmp = 0;
|
||||
*temperature = (float)c0 * 0.5f + (float)c1 * Traw_sc;
|
||||
precessure_tmp = (double)c00
|
||||
+ Praw_sc * ((double)c10 + Praw_sc * ((double)c20 + Praw_sc * (double)c30))
|
||||
+ Traw_sc * (double)c01
|
||||
+ Traw_sc * Praw_sc * ((double)c11 + Praw_sc + (double)c21);
|
||||
xlog("temperature:%.3f,precessure: %.3f\n",*temperature, precessure_tmp);
|
||||
*precessure = (float)precessure_tmp; // 传出
|
||||
}
|
||||
|
||||
float WF_Altitude_Calculate() {
|
||||
float pressure_pa = WF_Pressure_Calculate();
|
||||
// 使用标准大气压公式计算海拔
|
||||
|
||||
@ -1,18 +1,26 @@
|
||||
#ifndef _WF282A_H_
|
||||
#define _WF282A_H_
|
||||
|
||||
#include <stdint.h> // 使用标准整数类型
|
||||
|
||||
// 标定值
|
||||
#define KT 524288.0f
|
||||
// 标定值 (调整为16x过采样对应的Scale Factor)
|
||||
/*
|
||||
Oversampling Rate Scale Factor (kP or kT)
|
||||
1 (single) 524288
|
||||
2 times (Low Power) 1572864
|
||||
4 times 3670016
|
||||
8 times 7864320
|
||||
16 times (Standard) 253952
|
||||
32 times 516096
|
||||
64 times (High Precision) 1040384
|
||||
128 times 2088960
|
||||
*/
|
||||
#define KT 1572864.0f
|
||||
#define KP 1572864.0f
|
||||
|
||||
|
||||
#define WF_PULL_UP 1 //外部是否接的上拉
|
||||
|
||||
#define WF_PULL_UP 0 //外部是否接的上拉
|
||||
// I2C 从设备地址
|
||||
#if WF_PULL_UP == 1 //外部接的高
|
||||
#define WF_IIC_7BIT_ADDRESS 0x77 //7位,外部接高为0x77
|
||||
#if WF_PULL_UP == 0 //外部接高为0x77
|
||||
#define WF_IIC_7BIT_ADDRESS 0x77
|
||||
#define WF_IIC_WRITE_ADDRESS (WF_IIC_7BIT_ADDRESS<<1) //8位地址
|
||||
#define WF_IIC_READ_ADDRESS (WF_IIC_WRITE_ADDRESS | 0x01)
|
||||
#else
|
||||
@ -20,9 +28,7 @@
|
||||
#define WF_IIC_WRITE_ADDRESS (WF_IIC_7BIT_ADDRESS<<1) //8位地址
|
||||
#define WF_IIC_READ_ADDRESS (WF_IIC_WRITE_ADDRESS | 0x01)
|
||||
#endif
|
||||
|
||||
#define WF_CHIP_ID 0X10
|
||||
|
||||
// 寄存器映射
|
||||
// 压力数据
|
||||
#define WF_PRS_B2 0x00
|
||||
@ -35,14 +41,14 @@
|
||||
// 配置寄存器
|
||||
#define WF_PRS_CFG 0x06
|
||||
#define WF_TMP_CFG 0x07
|
||||
#define WF_MEAS_CFG 0x08
|
||||
#define WF_MEAS_CFG 0x08 // This register is used to trigger single measurements
|
||||
#define WF_CFG_REG 0x09
|
||||
#define WF_INT_STS 0x0A
|
||||
#define WF_FIFO_STS 0x0B
|
||||
#define WF_RESET_REG 0x0C
|
||||
// ID寄存器
|
||||
#define WF_ID_REG 0x0D
|
||||
// 校准系数寄存器
|
||||
// 校准系数寄存器 (Offsets match manufacturer's i+0x10 access)
|
||||
#define COEF_C0 0x10
|
||||
#define COEF_C0_C1 0x11
|
||||
#define COEF_C1 0x12
|
||||
@ -63,44 +69,43 @@
|
||||
#define COEF_C30_L 0x21
|
||||
|
||||
// --- 配置宏 ---
|
||||
|
||||
// 压力配置 (PRS_CFG[6:4]) - 测量速率
|
||||
// 压力配置 (PRS_CFG[6:4]) - 后台测量速率
|
||||
#define PM_RATE_1 0x00 // 1 次/秒
|
||||
#define PM_RATE_2 0x01 // 2 次/秒
|
||||
#define PM_RATE_4 0x02 // 4 次/秒
|
||||
#define PM_RATE_8 0x03 // 8 次/秒
|
||||
#define PM_RATE_16 0x04 // 16 次/秒
|
||||
#define PM_RATE_32 0x05 // 32 次/秒
|
||||
#define PM_RATE_32 0x05 // 32 次/秒 <--- 建议使用此速率
|
||||
#define PM_RATE_64 0x06 // 64 次/秒
|
||||
#define PM_RATE_128 0x07 // 128 次/秒
|
||||
// 压力配置 (PRS_CFG[3:0]) - 过采样率
|
||||
#define PM_PRC_1 0x00 // 1 次 (单次)
|
||||
#define PM_PRC_2 0x01 // 2 次 (低功耗)
|
||||
#define PM_PRC_4 0x02 // 4 次
|
||||
#define PM_PRC_8 0x03 // 8 次 (标准)
|
||||
#define PM_PRC_16 0x04 // 16 次 (需要移位)
|
||||
#define PM_PRC_32 0x05 // 32 次 (需要移位)
|
||||
#define PM_PRC_64 0x06 // 64 次 (高精度, 需要移位)
|
||||
#define PM_PRC_128 0x07 // 128 次 (需要移位)
|
||||
#define PM_PRC_8 0x03 // 8 次
|
||||
#define PM_PRC_16 0x04 // 16 次 (标准) <--- 建议使用此过采样率
|
||||
#define PM_PRC_32 0x05 // 32 次
|
||||
#define PM_PRC_64 0x06 // 64 次 (高精度)
|
||||
#define PM_PRC_128 0x07 // 128 次
|
||||
|
||||
// 温度配置 (TMP_CFG[7]) - 传感器源
|
||||
#define TMP_EXT_SENSOR 0x80 // 使用外部传感器
|
||||
#define TMP_INT_SENSOR 0x00 // 使用内部传感器
|
||||
// 温度配置 (TMP_CFG[6:4]) - 测量速率
|
||||
// 温度配置 (TMP_CFG[6:4]) - 后台测量速率
|
||||
#define TMP_RATE_1 0x00 // 1 次/秒
|
||||
#define TMP_RATE_2 0x01 // 2 次/秒
|
||||
#define TMP_RATE_4 0x02 // 4 次/秒
|
||||
#define TMP_RATE_8 0x03 // 8 次/秒
|
||||
#define TMP_RATE_16 0x04 // 16 次/秒
|
||||
#define TMP_RATE_32 0x05 // 32 次/秒
|
||||
#define TMP_RATE_32 0x05 // 32 次/秒 <--- 建议使用此速率
|
||||
#define TMP_RATE_64 0x06 // 64 次/秒
|
||||
#define TMP_RATE_128 0x07 // 128 次/秒
|
||||
// 温度配置 (TMP_CFG[3:0]) - 过采样率
|
||||
// 温度配置 (TMP_CFG[2:0]) - 过采样率
|
||||
#define TMP_PRC_1 0x00 // 1 次
|
||||
#define TMP_PRC_2 0x01 // 2 次
|
||||
#define TMP_PRC_4 0x02 // 4 次
|
||||
#define TMP_PRC_8 0x03 // 8 次
|
||||
#define TMP_PRC_16 0x04 // 16 次
|
||||
#define TMP_PRC_16 0x04 // 16 次 <--- 建议使用此过采样率
|
||||
#define TMP_PRC_32 0x05 // 32 次
|
||||
#define TMP_PRC_64 0x06 // 64 次
|
||||
#define TMP_PRC_128 0x07 // 128 次
|
||||
@ -110,39 +115,39 @@
|
||||
* @return 0: 成功, 1: 失败
|
||||
*/
|
||||
uint8_t WF_Init(void);
|
||||
|
||||
/**
|
||||
* @brief 使传感器进入休眠/待机模式
|
||||
*/
|
||||
void WF_Sleep(void);
|
||||
|
||||
/**
|
||||
* @brief 唤醒传感器,开始连续测量
|
||||
* 在连续模式下,通常只需要调用一次WF_Init即可,无需频繁调用Wakeup
|
||||
* 如果WF_Sleep被调用,则需要调用WF_Wakeup来恢复连续测量
|
||||
*/
|
||||
void WF_Wakeup(void);
|
||||
|
||||
void WF_Wakeup(void); // Reinstated for continuous mode control
|
||||
/**
|
||||
* @brief 获取传感器芯片ID
|
||||
* @return 芯片ID (应为 0x10)
|
||||
*/
|
||||
uint8_t WF_GetID(void);
|
||||
|
||||
/**
|
||||
* @brief 计算并返回当前海拔高度
|
||||
* @return 海拔高度 (单位: 米)
|
||||
*/
|
||||
float WF_Altitude_Calculate(void);
|
||||
|
||||
/**
|
||||
* @brief 计算并返回补偿后的压力值
|
||||
* @return 压力 (单位: Pa)
|
||||
*/
|
||||
float WF_Pressure_Calculate(void);
|
||||
|
||||
/**
|
||||
* @brief 计算并返回补偿后的温度值
|
||||
* @return 温度 (单位: °C)
|
||||
*/
|
||||
float WF_Temperature_Calculate(void);
|
||||
void WF_GET_Temperature_Pressure(float* temperature, float* precessure);
|
||||
|
||||
// Added Delay_xms prototype (assuming it's implemented in .c file or globally)
|
||||
void Delay_xms(uint8_t delay);
|
||||
|
||||
#endif // _WF282A_H_
|
||||
@ -7,4 +7,6 @@
|
||||
|
||||
#define ACC_RANGE 16 //g,加速度满量程:2、4、8、16
|
||||
|
||||
#define BMP280 0
|
||||
|
||||
#endif
|
||||
@ -49,6 +49,7 @@
|
||||
#include "./sensor/MMC56.h"
|
||||
#include "./sensor/BMP280.h"
|
||||
#include "./sensor/AK8963.h"
|
||||
#include "./sensor/WF282A.h"
|
||||
#include "./calculate/skiing_tracker.h"
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//宏定义
|
||||
@ -83,13 +84,13 @@ extern u8 init_ok;
|
||||
extern u8 sniff_out;
|
||||
unsigned char xtell_bl_state=0; //存放经典蓝牙的连接状态,0断开,1是连接
|
||||
u8 bt_newname =0;
|
||||
unsigned char xt_ble_new_name[9] = "xtell";
|
||||
unsigned char xt_ble_new_name[9] = "AAAAA";
|
||||
static u16 play_poweron_ok_timer_id = 0;
|
||||
|
||||
// -- 初始化标志位 --
|
||||
u8 SC7U22_init = 0x10; //六轴是否初始化
|
||||
u8 MMC5603nj_init = 0x20; //地磁是否初始化
|
||||
u8 BMP280_init = 0x30; //气压计初始化
|
||||
u8 barometer_init = 0x30; //气压计初始化
|
||||
u8 foot_init = 0x40; //数据来源初始化:左脚0x41 or 右脚0x42
|
||||
// -- 线程id --
|
||||
|
||||
@ -232,6 +233,7 @@ void le_user_app_event(u8* buffer){
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
// start_calibration();
|
||||
}else if(buffer[4] == 0x02){ //地磁
|
||||
|
||||
if(mmc5603nj_init() == 0){
|
||||
MMC5603nj_init = 0x20;
|
||||
send2_0[4] = MMC5603nj_init; //地磁初始化失败
|
||||
@ -242,16 +244,29 @@ void le_user_app_event(u8* buffer){
|
||||
send2_0[4] = MMC5603nj_init; //地磁初始化成功
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
}else if(buffer[4] == 0x03){ //气压计初始化
|
||||
if(bmp280_init() != 0){
|
||||
#if BMP280
|
||||
if(BMP280_init() != 0){
|
||||
//初始化失败
|
||||
BMP280_init = 0x30;
|
||||
send2_0[4] = BMP280_init;
|
||||
barometer_init = 0x30;
|
||||
send2_0[4] = barometer_init;
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
return;
|
||||
}
|
||||
BMP280_init = 0x31;
|
||||
send2_0[4] = BMP280_init; //气压计初始化成功
|
||||
barometer_init = 0x31;
|
||||
send2_0[4] = barometer_init; //气压计初始化成功
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
#else
|
||||
if(WF_Init() != 0){
|
||||
//初始化失败
|
||||
barometer_init = 0x30;
|
||||
send2_0[4] = barometer_init;
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
return;
|
||||
}
|
||||
barometer_init = 0x31;
|
||||
send2_0[4] = barometer_init; //气压计初始化成功
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 0x01: //设置传感器采集对象:左脚or右脚
|
||||
@ -271,13 +286,13 @@ void le_user_app_event(u8* buffer){
|
||||
}else if(buffer[4] == 0x02){ //地磁
|
||||
send2_2[4] = MMC5603nj_init;
|
||||
}else if(buffer[4] == 0x03){ //气压计
|
||||
send2_2[4] = BMP280_init;
|
||||
send2_2[4] = barometer_init;
|
||||
}
|
||||
send_data_to_ble_client(&send2_2,5);
|
||||
break;
|
||||
case 0x03: //开始/停止滑雪计算
|
||||
if(buffer[4] == 0x01){ //开始滑雪计算
|
||||
if(SC7U22_init == 0x10 || MMC5603nj_init == 0x20 || BMP280_init == 0x30){ //传感器未进行初始化
|
||||
if(SC7U22_init == 0x10 || MMC5603nj_init == 0x20 || barometer_init == 0x30){ //传感器未进行初始化
|
||||
u8 send2_3[5] = {0xBB,0xBE,0x02,0x00,0x00};
|
||||
send_data_to_ble_client(&send2_3,5);
|
||||
return;
|
||||
@ -366,15 +381,15 @@ void le_user_app_event_handler(struct sys_event* event){
|
||||
send2_0[4] = MMC5603nj_init; //地磁初始化成功
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
}else if(event->u.app.buffer[4] == 0x03){ //气压计初始化
|
||||
if(bmp280_init() != 0){
|
||||
if(BMP280_init() != 0){
|
||||
//初始化失败
|
||||
BMP280_init = 0x30;
|
||||
send2_0[4] = BMP280_init;
|
||||
barometer_init = 0x30;
|
||||
send2_0[4] = barometer_init;
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
return;
|
||||
}
|
||||
BMP280_init = 0x31;
|
||||
send2_0[4] = BMP280_init; //气压计初始化成功
|
||||
barometer_init = 0x31;
|
||||
send2_0[4] = barometer_init; //气压计初始化成功
|
||||
send_data_to_ble_client(&send2_0,5);
|
||||
}
|
||||
break;
|
||||
@ -395,13 +410,13 @@ void le_user_app_event_handler(struct sys_event* event){
|
||||
}else if(event->u.app.buffer[4] == 0x02){ //地磁
|
||||
send2_2[4] = MMC5603nj_init;
|
||||
}else if(event->u.app.buffer[4] == 0x03){ //气压计
|
||||
send2_2[4] = BMP280_init;
|
||||
send2_2[4] = barometer_init;
|
||||
}
|
||||
send_data_to_ble_client(&send2_2,5);
|
||||
break;
|
||||
case 0x03: //开始/停止滑雪计算
|
||||
if(event->u.app.buffer[4] == 0x01){ //开始滑雪计算
|
||||
if(SC7U22_init == 0x10 || MMC5603nj_init == 0x20 || BMP280_init == 0x30){ //传感器未进行初始化
|
||||
if(SC7U22_init == 0x10 || MMC5603nj_init == 0x20 || barometer_init == 0x30){ //传感器未进行初始化
|
||||
u8 send2_3[5] = {0xBB,0xBE,0x02,0x00,0x00};
|
||||
send_data_to_ble_client(&send2_3,5);
|
||||
return;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -10,7 +10,7 @@ copy ..\..\ota.bin .
|
||||
copy ..\..\anc_coeff.bin .
|
||||
copy ..\..\anc_gains.bin .
|
||||
|
||||
..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin ..\..\eq_cfg_hw.bin -uboot_compress -format all
|
||||
..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin ..\..\eq_cfg_hw.bin -uboot_compress -format all -key 646-AC690X-7603.key
|
||||
|
||||
@REM..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br34 -boot 0x20000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin ..\..\cfg_tool.bin -res tone.cfg kws_command.bin p11_code.bin -uboot_compress
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ copy ..\..\ota.bin .
|
||||
copy ..\..\anc_coeff.bin .
|
||||
copy ..\..\anc_gains.bin .
|
||||
|
||||
..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin ..\..\eq_cfg_hw.bin -uboot_compress -key 646-AC690X-7603.key
|
||||
..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin ..\..\eq_cfg_hw.bin -uboot_compress
|
||||
|
||||
@REM..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br34 -boot 0x20000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin ..\..\cfg_tool.bin -res tone.cfg kws_command.bin p11_code.bin -uboot_compress
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ copy ..\..\anc_coeff.bin .
|
||||
copy ..\..\anc_gains.bin .
|
||||
|
||||
:: -format all -key AC690X-8029.key
|
||||
..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin ..\..\eq_cfg_hw.bin -uboot_compress -key AC690X-8029.key
|
||||
..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br28 -boot 0x120000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin -res ..\..\cfg_tool.bin tone.cfg p11_code.bin ..\..\eq_cfg_hw.bin -uboot_compress
|
||||
|
||||
@REM..\..\isd_download.exe ..\..\isd_config.ini -tonorflash -dev br34 -boot 0x20000 -div8 -wait 300 -uboot ..\..\uboot.boot -app ..\..\app.bin ..\..\cfg_tool.bin -res tone.cfg kws_command.bin p11_code.bin -uboot_compress
|
||||
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -2260,6 +2260,7 @@ objs/apps/earphone/board/br28/board_jl701n_demo.c.o
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,power_wakeup_index_enable,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,gSensor_wkupup_enable,pl
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,debug_uart_init,pl
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,uart_init,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,get_led_config,pl
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,get_tone_config,pl
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,get_sys_default_vol,pl
|
||||
@ -2270,6 +2271,7 @@ objs/apps/earphone/board/br28/board_jl701n_demo.c.o
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,cfg_file_parse,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,devices_init,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,power_set_mode,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,gpio_set_die,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,bredr_set_dut_enble,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,board_set_soft_poweroff,pl
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,soff_gpio_protect,l
|
||||
@ -2281,7 +2283,6 @@ objs/apps/earphone/board/br28/board_jl701n_demo.c.o
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,sleep_enter_callback,pl
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,gpio_set_pull_up,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,gpio_set_pull_down,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,gpio_set_die,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,gpio_set_dieh,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,gpio_set_direction,l
|
||||
-r=objs/apps/earphone/board/br28/board_jl701n_demo.c.o,sleep_enter_callback_common,l
|
||||
@ -4654,7 +4655,6 @@ objs/cpu/br28/plcnt.c.o
|
||||
-r=objs/cpu/br28/plcnt.c.o,get_plcnt_value,pl
|
||||
objs/cpu/br28/power/power_app.c.o
|
||||
-r=objs/cpu/br28/power/power_app.c.o,BTOSC_FASTBOOT_EN,pl
|
||||
-r=objs/cpu/br28/power/power_app.c.o,power_app_lp_target,pl
|
||||
objs/cpu/br28/power/power_check.c.o
|
||||
-r=objs/cpu/br28/power/power_check.c.o,sleep_safety_check,pl
|
||||
-r=objs/cpu/br28/power/power_check.c.o,soff_safety_check,pl
|
||||
@ -4791,12 +4791,16 @@ objs/cpu/br28/setup.c.o
|
||||
-r=objs/cpu/br28/setup.c.o,tick_timer_init,l
|
||||
-r=objs/cpu/br28/setup.c.o,port_init,l
|
||||
-r=objs/cpu/br28/setup.c.o,debug_uart_init,l
|
||||
-r=objs/cpu/br28/setup.c.o,uart_dev_set_irq_handler_hook,l
|
||||
-r=objs/cpu/br28/setup.c.o,log_early_init,l
|
||||
-r=objs/cpu/br28/setup.c.o,clock_dump,l
|
||||
-r=objs/cpu/br28/setup.c.o,reset_source_dump,l
|
||||
-r=objs/cpu/br28/setup.c.o,power_wakeup_reason_dump,l
|
||||
-r=objs/cpu/br28/setup.c.o,sys_timer_init,l
|
||||
-r=objs/cpu/br28/setup.c.o,__crc16_mutex_init,l
|
||||
-r=objs/cpu/br28/setup.c.o,log_print,l
|
||||
-r=objs/cpu/br28/setup.c.o,put_buf,l
|
||||
-r=objs/cpu/br28/setup.c.o,log_tag_const_i_SETUP,l
|
||||
objs/cpu/br28/smart_voice/aispeech_asr.c.o
|
||||
-r=objs/cpu/br28/smart_voice/aispeech_asr.c.o,aispeech_asr_output_handler,pl
|
||||
-r=objs/cpu/br28/smart_voice/aispeech_asr.c.o,strstr,l
|
||||
@ -5305,12 +5309,13 @@ objs/apps/earphone/xtell_Sensor/xtell_handler.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,test_func,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,SL_SC7U22_Config,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,mmc5603nj_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,bmp280_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,WF_Init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,start_clloct,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,stop_clloct,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,le_user_app_send_event,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,sys_event_notify,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,le_user_app_event_handler,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,BMP280_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,p33_soft_reset,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,clk_set,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,clk_get,l
|
||||
@ -5354,7 +5359,7 @@ objs/apps/earphone/xtell_Sensor/xtell_handler.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,xt_ble_new_name,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,SC7U22_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,MMC5603nj_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,BMP280_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,barometer_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,foot_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,gsensor_test_id,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/xtell_handler.c.o,app_var,l
|
||||
@ -5369,7 +5374,7 @@ objs/apps/earphone/xtell_Sensor/send_data.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,sensor_collect_task,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,mmc5603nj_read_mag_data,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,SL_SC7U22_FIFO_Read,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,bmp280_read_data,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,WF_GET_Temperature_Pressure,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,circle_buffer_write,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,os_sem_post,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,os_time_dly,l
|
||||
@ -5383,17 +5388,14 @@ objs/apps/earphone/xtell_Sensor/send_data.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,os_task_create,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,stop_clloct,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,os_task_del,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,test_uart_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,xtell_task_create,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,hw_iic_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,circle_buffer_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,os_sem_create,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,test_uart_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,uart_dev_open,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,data_send_task,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,sensor_test_task,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,test_func,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,SL_SC7U22_Config,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,mmc5603nj_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,bmp280_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,WF_Init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,puts,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,foot_init,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/send_data.c.o,j,pl
|
||||
@ -5474,7 +5476,6 @@ objs/apps/earphone/xtell_Sensor/calculate/skiing_tracker.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/calculate/skiing_tracker.c.o,debug1,pl
|
||||
objs/apps/earphone/xtell_Sensor/ano/ano_protocol.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/ano/ano_protocol.c.o,ano_protocol_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/ano/ano_protocol.c.o,uart_dev_open,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/ano/ano_protocol.c.o,ano_send_inertial_data,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/ano/ano_protocol.c.o,ano_send_attitude_data,pl
|
||||
objs/apps/earphone/xtell_Sensor/sensor/MMC56.c.o
|
||||
@ -5494,7 +5495,7 @@ objs/apps/earphone/xtell_Sensor/sensor/MMC56.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/MMC56.c.o,puts,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/MMC56.c.o,cal_data,pl
|
||||
objs/apps/earphone/xtell_Sensor/sensor/BMP280.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/BMP280.c.o,bmp280_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/BMP280.c.o,BMP280_init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/BMP280.c.o,printf,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/BMP280.c.o,os_time_dly,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/BMP280.c.o,bmp280_read_data,pl
|
||||
@ -5511,6 +5512,19 @@ objs/apps/earphone/xtell_Sensor/sensor/AK8963.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/AK8963.c.o,MPU9250_Read_Mag_Raw,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/AK8963.c.o,MPU9250_Read_Mag_uT,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/AK8963.c.o,puts,l
|
||||
objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,WF_Init,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,printf,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,delay,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,WF_GetID,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,WF_Sleep,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,WF_Wakeup,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,WF_GET_Temperature_Pressure,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,WF_Altitude_Calculate,pl
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,WF_Pressure_Calculate,
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,powf,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,_gravity_sensor_get_ndata,l
|
||||
-r=objs/apps/earphone/xtell_Sensor/sensor/WF282A.c.o,gravity_sensor_command,l
|
||||
cpu/br28/liba/cpu.a.llvm.19376.crc16.c
|
||||
-r=cpu/br28/liba/cpu.a.llvm.19376.crc16.c,__crc16_mutex_init,pl
|
||||
-r=cpu/br28/liba/cpu.a.llvm.19376.crc16.c,os_mutex_create,l
|
||||
|
||||
Reference in New Issue
Block a user