地磁8面校准完成
This commit is contained in:
@ -188,12 +188,18 @@ void hw_iic_stop(hw_iic_dev iic)
|
||||
|
||||
u8 hw_iic_tx_byte(hw_iic_dev iic, u8 byte)
|
||||
{
|
||||
// printf("====debug1=======\n");
|
||||
u8 id = iic_get_id(iic);
|
||||
// printf("====debug2=======\n");
|
||||
iic_dir_out(iic_regs[id]);
|
||||
// printf("====debug3=======\n");
|
||||
iic_buf_reg(iic_regs[id]) = byte;
|
||||
// printf("====debug4=======\n");
|
||||
iic_cfg_done(iic_regs[id]);
|
||||
// printf("====debug5=======\n");
|
||||
/* putchar('a'); */
|
||||
while (!iic_pnd(iic_regs[id]));
|
||||
// printf("====debug6=======\n");
|
||||
iic_pnd_clr(iic_regs[id]);
|
||||
/* putchar('b'); */
|
||||
return iic_send_is_ack(iic_regs[id]);
|
||||
|
||||
Reference in New Issue
Block a user