diff --git a/twi.c b/twi.c index 2acaf4f..dec53e8 100644 --- a/twi.c +++ b/twi.c @@ -42,27 +42,27 @@ #define TWI_DEFAULT_DEVICE "/dev/i2c-0" -#define READ_BLOCK_SIZE 128 /* bytes in one flash/eeprom read request */ -#define WRITE_BLOCK_SIZE 16 /* bytes in one eeprom write request */ +#define READ_BLOCK_SIZE 128 /* bytes in one flash/eeprom read request */ +#define WRITE_BLOCK_SIZE 16 /* bytes in one eeprom write request */ /* SLA+R */ -#define CMD_WAIT 0x00 -#define CMD_READ_VERSION 0x01 -#define CMD_READ_MEMORY 0x02 +#define CMD_WAIT 0x00 +#define CMD_READ_VERSION 0x01 +#define CMD_READ_MEMORY 0x02 /* SLA+W */ -#define CMD_SWITCH_APPLICATION CMD_READ_VERSION -#define CMD_WRITE_MEMORY CMD_READ_MEMORY +#define CMD_SWITCH_APPLICATION CMD_READ_VERSION +#define CMD_WRITE_MEMORY CMD_READ_MEMORY /* CMD_SWITCH_APPLICATION parameter */ -#define BOOTTYPE_BOOTLOADER 0x00 /* only in APP */ -#define BOOTTYPE_APPLICATION 0x80 +#define BOOTTYPE_BOOTLOADER 0x00 /* only in APP */ +#define BOOTTYPE_APPLICATION 0x80 /* CMD_{READ|WRITE}_* parameter */ -#define MEMTYPE_CHIPINFO 0x00 -#define MEMTYPE_FLASH 0x01 -#define MEMTYPE_EEPROM 0x02 -#define MEMTYPE_PARAMETERS 0x03 /* only in APP */ +#define MEMTYPE_CHIPINFO 0x00 +#define MEMTYPE_FLASH 0x01 +#define MEMTYPE_EEPROM 0x02 +#define MEMTYPE_PARAMETERS 0x03 /* only in APP */ struct multiboot_ops twi_ops;