#ifndef AVR8EMU_LIBRARY_H_ #define AVR8EMU_LIBRARY_H_ #include /* Type of an emulator instance. */ struct avr8emu; struct avr8emu_callbacks { void (*status_message)(struct avr8emu *emu, const char *msg); }; /* Create a new emulator instance. */ struct avr8emu * avr8emu_create(enum avr_setup_type type, const struct avr8emu_callbacks *cb); /* Delete an emulator instance. */ void avr8emu_remove(struct avr8emu *emu); /* Initialize the microcontroller. */ int avr8emu_initialize(struct avr8emu *emu, const char *code, size_t code_size); /* Reset the microcontroller. This will start execution of * the code if invoked for the first time. */ int avr8emu_reset(struct avr8emu *emu); /* Call this on a regular basis to poll any messages from the * worker process. */ void avr8emu_poll_messages(struct avr8emu *emu); /* Call this on a regular basis to poll any status messages * from the worker process. */ int avr8emu_poll_status(struct avr8emu *emu); #endif /* AVR8EMU_LIBRARY_H_ */