From cf343962a20706fd6158ba1be469be93dccdfd9b Mon Sep 17 00:00:00 2001 From: Leo C. Date: Tue, 6 Aug 2024 12:36:57 +0200 Subject: Keep some ro data in flash using __memx address space. --- avr/i2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'avr/i2c.c') diff --git a/avr/i2c.c b/avr/i2c.c index a0a12c8..19ec604 100644 --- a/avr/i2c.c +++ b/avr/i2c.c @@ -255,7 +255,7 @@ int_fast8_t i2c_waitready(void) xmit.stat |= timeout; #if DEBUG_I2C - dump_ram((uint8_t *) &xmit, 4, "=== i2c_wait ready: (done)"); + dump_ram((uint8_t *) &xmit, 4, PSTR("=== i2c_wait ready: (done)")); _delay_ms(30); #endif return xmit.stat; @@ -282,7 +282,7 @@ int i2c_send(uint8_t chip, uint16_t addr, uint8_t alen, uint8_t *buffer, int8_t xmit.len = i; #if DEBUG_I2C - dump_ram((uint8_t *) &xmit, 0x20, "=== i2c_send"); + dump_ram((uint8_t *) &xmit, 0x20, PSTR("=== i2c_send")); _delay_ms(30); #endif /* Enable TWI, TWI int and initiate start condition */ @@ -307,7 +307,7 @@ int i2c_recv(uint8_t chip, uint8_t *buffer, int8_t len) xmit.buf[0] = (chip<<1) | 1; #if DEBUG_I2C - dump_ram((uint8_t *) &xmit, 0x20, "=== i2c_recv: before start"); + dump_ram((uint8_t *) &xmit, 0x20, PSTR("=== i2c_recv: before start")); _delay_ms(30); #endif /* Enable TWI, TWI int and initiate start condition */ @@ -315,7 +315,7 @@ int i2c_recv(uint8_t chip, uint8_t *buffer, int8_t len) rc = i2c_waitready(); #if DEBUG_I2C - dump_ram((uint8_t *) &xmit, 0x20, "=== i2c_recv: after completion"); + dump_ram((uint8_t *) &xmit, 0x20, PSTR("=== i2c_recv: after completion")); _delay_ms(30); #endif if (rc & DATA_ACK) { -- cgit v1.2.3