get_skip_num()该函数的源码在哪里可以找到
wh
@wh
wh 发布的帖子
-
6轴陀螺仪/加速度传感器 ,得到的6个数据(XYZ方向的加速的,角加速度)为什么数值大小一样,他们的单位是什么?
freqchipIIC demo
X:54998 |Y:54998 |Z:54998
AccX:54998|Acc_Y:54998|Acc_Z:54998
X:54998 |Y:54998 |Z:54998
AccX:54998|Acc_Y:54998|Acc_Z:54998
X:54998 |Y:54998 |Z:54998
AccX:54998|Acc_Y:54998|Acc_Z:54998
X:54998 |Y:54998 |Z:54998
AccX:54998|Acc_Y:54998|Acc_Z:54998
IIC demo#if I2C_DEMO_ENABLE
#include "driver_system.h"
#include "driver_iomux.h"#include "driver_iic.h"
static const uint8_t LSM6DS33_ADDR = (0x6B<<1);
void demo_i2c(void)
{
uint8_t i2c_test_no = 0;
uint8_t buff1[6];
uint8_t buff2[6];
co_printf("IIC demo\r\n");system_set_port_mux(GPIO_PORT_D, GPIO_BIT_6, PORTD6_FUNC_I2C1_CLK);//Pc6 system_set_port_mux(GPIO_PORT_D, GPIO_BIT_7, PORTD7_FUNC_I2C1_DAT);//Pc7 system_set_port_pull( (GPIO_PD6|GPIO_PD7), false);
//IIC1, 1M hz. slave addr: 0xd6
iic_init(IIC_CHANNEL_1,1000,LSM6DS33_ADDR);
iic_write_byte(IIC_CHANNEL_1,LSM6DS33_ADDR,0x15,0x00);
iic_write_byte(IIC_CHANNEL_1,LSM6DS33_ADDR,0x16,0x00);
iic_write_byte(IIC_CHANNEL_1,LSM6DS33_ADDR,0x10,0x80);
iic_write_byte(IIC_CHANNEL_1,LSM6DS33_ADDR,0x11,0x80);
iic_write_byte(IIC_CHANNEL_1,LSM6DS33_ADDR,0x12,0x04);while(1) { for(uint8_t i=0; i<6; i++) { iic_read_byte(IIC_CHANNEL_1,LSM6DS33_ADDR,0x28+i,&buff1[i]); iic_read_byte(IIC_CHANNEL_1,LSM6DS33_ADDR,0x22+i,&buff2[i]); } co_printf("X:%d |Y:%d |Z:%d\r\n",*(uint16_t *)buff1,*(uint16_t *)(buff1+2),*(uint16_t *)(buff1+4)); co_printf("AccX:%d|Acc_Y:%d|Acc_Z:%d\r\n",*(uint16_t *)buff2,*(uint16_t *)(buff2+2),*(uint16_t *)(buff2+4)); i2c_test_no++; if(i2c_test_no>3) break; }
}
#endif -
FR8016H定时器,为什么发送出来的值不是向上累加,而是随机数
uint8_t cout = 0;
const uint8_t* _cout ;
void user_entry_after_ble_init(void)
{
co_printf("user_entry_after_ble_init\r\n");#if 1
//stop sleep
system_sleep_disable();
#endifuart_init(UART1, BAUD_RATE_115200);
uart_finish_transfers(UART1);
timer_init(TIMER1, 20, 1);timer_run(TIMER1); while (1) { //timer_stop(TIMER1); cout = timer_get_current_value(TIMER1); _cout = &cout; uart_write(UART1, _cout , 1); co_delay_100us(5000); }
}