contrib/firmware: add 'send not acknowledged' function to the i2c bit-banging impleme... 11/7811/5
authorAhmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Mon, 16 Oct 2023 09:05:59 +0000 (11:05 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 18 Nov 2023 11:24:40 +0000 (11:24 +0000)
Change-Id: I60597ebc126da4acb00654513b96f52261253e12
Signed-off-by: Ahmed BOUDJELIDA <aboudjelida@nanoxplore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7811
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
contrib/firmware/angie/c/include/i2c.h
contrib/firmware/angie/c/src/i2c.c
contrib/firmware/angie/c/src/usb.c

index 06185efb4dd3fe1afcbe21007f52fb1243f7d291..d0404923b33bd8c26a439994ac601e4692b74690 100644 (file)
@@ -19,6 +19,7 @@ void repeated_start(void);
 void stop_cd(void);
 void clock_cd(void);
 void send_ack(void);
+void send_nack(void);
 bool get_ack(void);
 
 uint8_t get_address(uint8_t adr, uint8_t rdwr);
index a7004bfac90a5ba980f7f634b4de69d3fdfb8b71..53840100b93a50cca1443258932efcc4b390809a 100644 (file)
@@ -60,6 +60,16 @@ void send_ack(void)
        delay_us(1);
 }
 
+void send_nack(void)
+{
+       PIN_SDA = 1;
+       delay_us(1);
+       PIN_SCL = 1;
+       delay_us(1);
+       PIN_SCL = 0;
+       delay_us(1);
+}
+
 bool get_ack(void)
 {
        PIN_SDA_DIR = 1;
index 0a43ff9f656286d3d03f9537d4822e6d8cfe35c3..1b7aa476583a53f8f966f5564bd00649190b1185 100644 (file)
@@ -798,6 +798,9 @@ void i2c_recieve(void)
 
                EP8FIFOBUF[count - 1] = receive_byte();
 
+               /*  send Nack:  */
+               send_nack();
+
                /*   stop   */
                stop_cd();
 

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)