update Test
This commit is contained in:
parent
c738758223
commit
9136b223bd
@ -31,9 +31,11 @@
|
||||
#define AP3216CCMD_ALS_L (0x0C)
|
||||
#define AP3216CCMD_ALS_H (0x0D)
|
||||
|
||||
//
|
||||
#define SEG_ADDR (0x60)
|
||||
//#define SEG_ADDR (0x70)
|
||||
//数码管I2C从机地址
|
||||
#define SEG_I2C_ADDR (0x60)
|
||||
//#define SEG_I2C_ADDR (0x70)
|
||||
//数码管寄存器地址
|
||||
#define SEG_MEM_ADDR (0x10)
|
||||
|
||||
/* USER CODE END PTD */
|
||||
|
||||
@ -233,7 +235,7 @@ void Seg_Disp(uint8_t Wela, uint8_t Dula, uint8_t IsPoint)
|
||||
seg_data |= 0x80; // 设置小数点
|
||||
else
|
||||
seg_data &= 0x7F; // 清除小数点
|
||||
HAL_I2C_Mem_Write(&hi2c1,SEG_ADDR,0x10+Wela, 1, &seg_data, 1, 100);
|
||||
HAL_I2C_Mem_Write(&hi2c1,SEG_I2C_ADDR,SEG_MEM_ADDR+Wela, 1, &seg_data, 1, 100);
|
||||
}
|
||||
|
||||
//数码管显示处理
|
||||
|
Loading…
Reference in New Issue
Block a user