py_functions.h 561 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _PY_FUNCTIONS_H_
  2. #define _PY_FUNCTIONS_H_
  3. #include "../emulator.h"
  4. #include "py_interface.h"
  5. #include <Python.h>
  6. #define SET_REG_P1_IN 0x05
  7. #define SET_REG_P2_IN 0x06
  8. #define GET_REG_GP 0x04
  9. #define GET_REG_P1 0x05
  10. #define GET_REG_P2 0x06
  11. #define GET_REG_TIMER_A 0x07
  12. #define GET_REG_USCI 0x08
  13. // This is an ugly solution but heh
  14. void play_emu();
  15. void pause_emu();
  16. void cmd_emu(char *line, int len);
  17. void start_emu(char *file);
  18. void stop_emu();
  19. void reset_emu();
  20. void set_reg(uint8_t reg_type, uint8_t value);
  21. PyObject *get_port1_regs();
  22. #endif