Добавить идентификацию прошивки и чтение EEPROM Бальзам-167

This commit is contained in:
2026-10-05 17:48:23 +03:00
parent 0e3d89e1ee
commit 90046de7fd
28 changed files with 924 additions and 22 deletions

View File

@@ -8,7 +8,17 @@
extern unsigned int ump_log_read(unsigned int address);
extern int ump_log_write(unsigned int address, unsigned int value);
static uint16_t read_word(void *context, uint16_t address)
{ (void)context; return (uint16_t)ump_log_read(address); }
{
(void)context;
/* Optional board binding to the common firmware-info static port. Older
* consumers still link without it and return contract=0 (unknown version).
* This hook changes neither PM67 CAN nor the saved parameter layout. */
#ifdef UMP_FIRMWARE_INFO_READ
if (address >= UMP_FIRMWARE_INFO && address < UMP_FIRMWARE_INFO + UMP_FIRMWARE_INFO_WORDS)
return UMP_FIRMWARE_INFO_READ(address - UMP_FIRMWARE_INFO);
#endif
return (uint16_t)ump_log_read(address);
}
static int write_word(void *context, uint16_t address, uint16_t value)
{ (void)context; return ump_log_write(address,value); }
unsigned ump_tms28335_prepare(unsigned fn, uint16_t a, uint16_t n,