avr_isp_chip_arr.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include <furi_hal.h>
  3. #define F_AVR8L 1 // TPI programming, ATtiny(4|5|9|10|20|40|102|104)
  4. #define F_AVR8 2 // ISP programming with SPI, "classic" AVRs
  5. #define F_XMEGA 4 // PDI programming, ATxmega family
  6. #define F_AVR8X 8 // UPDI programming, newer 8-bit MCUs
  7. struct AvrIspChipArr { // Value of -1 typically means unknown
  8. const char* name; // Name of part
  9. uint16_t mcuid; // ID of MCU in 0..2039
  10. uint8_t avrarch; // F_AVR8L, F_AVR8, F_XMEGA or F_AVR8X
  11. uint8_t sigs[3]; // Signature bytes
  12. int32_t flashoffset; // Flash offset
  13. int32_t flashsize; // Flash size
  14. int16_t pagesize; // Flash page size
  15. int8_t nboots; // Number of supported boot sectors
  16. int16_t bootsize; // Size of (smallest) boot sector
  17. int32_t eepromoffset; // EEPROM offset
  18. int32_t eepromsize; // EEPROM size
  19. int32_t eeprompagesize; // EEPROM page size
  20. int32_t sramstart; // SRAM offset
  21. int32_t sramsize; // SRAM size
  22. int8_t nfuses; // Number of fuse bytes
  23. int8_t nlocks; // Number of lock bytes
  24. uint8_t ninterrupts; // Number of vectors in interrupt vector table
  25. };
  26. typedef struct AvrIspChipArr AvrIspChipArr;
  27. extern const AvrIspChipArr avr_isp_chip_arr[];
  28. extern const size_t avr_isp_chip_arr_size;