Skip to content

Commit

Permalink
contrib/firmware: remove unnecessary delay commands in the i2c bit-ba…
Browse files Browse the repository at this point in the history
…nging implementation

Change-Id: I741244be7a1bf186cfcb66a5b93e2a1a2ab0fde5
Signed-off-by: Ahmed BOUDJELIDA <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/7809
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
  • Loading branch information
Ahmed BOUDJELIDA authored and borneoa committed Nov 18, 2023
1 parent 393da81 commit 8bf7f60
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions contrib/firmware/angie/c/src/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,26 +773,20 @@ void i2c_recieve(void)
/* ack: */
uint8_t ack = get_ack();

delay_us(10);

/* send data */
if (reg_adr_check) { //if there is a byte reg
send_byte(reg_adr);
/* ack(): */
ack = get_ack();
}

delay_us(10);

/* repeated start: */
repeated_start();
/* address: */
send_byte(address);
/* get ack: */
ack = get_ack();

delay_us(10);

/* receive data */
for (uint8_t i = 0; i < count; i++) {
EP8FIFOBUF[i] = receive_byte();
Expand All @@ -801,13 +795,9 @@ void i2c_recieve(void)
send_ack();
}

delay_ms(1);

/* stop */
stop_cd();

delay_us(10);

EP8BCH = 0; //EP8
syncdelay(3);
EP8BCL = count; //EP8
Expand Down

0 comments on commit 8bf7f60

Please sign in to comment.