AVR ISP adapter (avr109/910 compatible, using ATmega16)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB

  1. #ifndef AVRDEVICE_H_
  2. #define AVRDEVICE_H_
  3. #include <stdint.h>
  4. /* *********************************************************************** */
  5. #define POLL_00 0x01 /* value 0x00 can not be polled from flash/eeprom */
  6. #define POLL_7F 0x02 /* value 0x7F can not be polled from flash/eeprom */
  7. #define POLL_80 0x04 /* value 0x80 can not be polled from flash/eeprom */
  8. #define POLL_FF 0x08 /* value 0xFF can not be polled from flash/eeprom */
  9. typedef struct avr_device_s
  10. {
  11. char name[12];
  12. uint8_t sig[3]; /* device signature */
  13. uint8_t devcode; /* avr910 device code */
  14. uint16_t pagemask; /* pagemask (pagesize in words!) */
  15. uint16_t flags; /* quirks for this device */
  16. } avr_device_t;
  17. typedef void (* avrdevice_callback_t)(uint8_t value);
  18. /* *********************************************************************** */
  19. void avrdevice_iterate_devcodes (avrdevice_callback_t callback);
  20. void avrdevice_get_by_signature (avr_device_t * p_device,
  21. const uint8_t * p_signature);
  22. /* *********************************************************************** */
  23. #endif /* AVRDEVICE_H_ */