30#define qemu_mutex_lock_iothread() qemu_mutex_lock_iothread_impl(__FILE__, __LINE__)
32typedef uint64_t hwaddr;
34 QEMU_CLOCK_REALTIME = 0,
35 QEMU_CLOCK_VIRTUAL = 1,
37 QEMU_CLOCK_VIRTUAL_RT = 3,
42typedef void QEMUTimerCB(
void* opaque);
43typedef struct QEMUTimerList QEMUTimerList;
44typedef struct QEMUTimerListGroup QEMUTimerListGroup;
48 QEMUTimerList* timer_list;
62extern void (*qemu_init)(int,
char**,
const char**);
63extern void (*qemu_main_loop)(void);
64extern void (*qemu_cleanup)(void);
66extern void (*qmp_quit)(Error** errp);
67extern void (*qmp_stop)(Error** errp);
68extern void (*qmp_system_reset)(Error** errp);
69extern void (*qmp_pmemsave)(int64_t val, int64_t size,
const char* filename, Error** errp);
70extern void (*qmp_memsave)(int64_t val, int64_t size,
const char* filename, Error** errp);
71extern void (*qmp_cont)(Error** errp);
73extern void (*qemu_mutex_lock_iothread_impl)(
const char* file,
int line);
74extern void (*qemu_mutex_unlock_iothread)(void);
76extern void (*qemu_picsimlab_register_callbacks)(
void* arg);
77extern void (*qemu_picsimlab_set_pin)(
int pin,
int value);
78extern void (*qemu_picsimlab_set_apin)(
int chn,
int value);
79extern int (*qemu_picsimlab_flash_dump)(int64_t offset,
void* buf,
int bytes);
80extern void (*qemu_picsimlab_uart_receive)(
const int id,
const uint8_t* buf,
int size);
82extern int64_t (*qemu_clock_get_ns)(QEMUClockType type);
84extern void (*timer_init_full)(
QEMUTimer* ts, QEMUTimerListGroup* timer_list_group, QEMUClockType type,
int scale,
85 int attributes, QEMUTimerCB* cb,
void* opaque);
87extern void (*timer_mod_ns)(
QEMUTimer* ts, int64_t expire_time);
89extern uint32_t* (*qemu_picsimlab_get_internals)(
int cfg);
91extern uint32_t (*qemu_picsimlab_get_TIOCM)(void);
94 void (*picsimlab_write_pin)(
int pin,
int value);
95 void (*picsimlab_dir_pin)(
int pin,
int value);
96 int (*picsimlab_i2c_event)(
const uint8_t id,
const uint8_t addr,
const uint16_t event);
97 uint8_t (*picsimlab_spi_event)(
const uint8_t id,
const uint16_t event);
98 void (*picsimlab_uart_tx_event)(
const uint8_t id,
const uint8_t value);
99 const short int* pinmap;
100 void (*picsimlab_rmt_event)(
const uint8_t channel,
const uint32_t config0,
const uint32_t value);
106 I2C_START_SEND_ASYNC,
113#define QEMU_INTERNAL_STRAP 0
114#define QEMU_INTERNAL_GPIO_IN_SEL 1
115#define QEMU_INTERNAL_GPIO_OUT_SEL 2
116#define QEMU_INTERNAL_IOMUX_GPIOS 3
117#define QEMU_INTERNAL_LEDC_CHANNEL_CONF 4
118#define QEMU_INTERNAL_LEDC_TIMER_FREQ 5
119#define QEMU_INTERNAL_LEDC_CHANNEL_DUTY 6
120#define QEMU_INTERNAL_UART0_BAUD 7
121#define QEMU_INTERNAL_UART1_BAUD 8
122#define QEMU_INTERNAL_UART2_BAUD 9
124#define QEMU_EXTRA_PIN_IN_CFG 1
125#define QEMU_EXTRA_PIN_OUT_CFG 2
126#define QEMU_EXTRA_PIN_IOMUX_CFG 4
127#define QEMU_EXTRA_PIN_LEDC_CFG 5