py_functions.h 689 B

123456789101112131415161718192021222324252627282930313233343536
  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_BCM 0x03
  9. //#define GET_REG_GP 0x04
  10. #define GET_REG_P1 0x05
  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. PyObject *get_bcm_regs();
  23. PyObject *get_timer_regs();
  24. PyObject *get_usci_regs();
  25. void write_serial(uint8_t *data, int len);
  26. #endif