lpc.h 638 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __LPC_H__
  2. #define __LPC_H__
  3. #include <serial.h>
  4. #include <sprog.h>
  5. struct lpc_device {
  6. struct serial_device *port;
  7. const struct lpc_part *part;
  8. int reply_time;
  9. };
  10. struct lpc_device *lpc_setup(struct serial_device *port);
  11. void lpc_init(struct lpc_device *dev);
  12. void lpc_exec(struct lpc_device *dev, const struct sprog_data *d);
  13. void lpc_write(struct lpc_device *dev, const struct sprog_data *d);
  14. void lpc_close(struct lpc_device *dev);
  15. struct lpc_part {
  16. const char *name;
  17. unsigned int part_id;
  18. int ram;
  19. int flash;
  20. };
  21. extern const struct lpc_part lpc_parts[];
  22. extern const struct sprog_family lpc_family;
  23. #endif