16#define SIF2_CMD_DBG_PUTS (1)
17#define SIF2_CMD_DBG_EXC (2)
18#define SIF2_CMD_DBG_CTRL (3)
20extern int _iop_exception_state;
31extern int _iop_controlled;
34void sbus_tty_puts(
const char *str)
36 SIF2_send_cmd(SIF2_CMD_DBG_PUTS, (
void *) str, strlen(str) + 1);
41 SIF2_send_cmd(SIF2_CMD_DBG_EXC, (
void *) frame,
sizeof(
IOP_RegFrame));
46void _sif2_cmd_dbg_control(
SIF2_CmdPkt *cmd,
void *param)
63 if(_iop_exception_state == 0) {
return; }
65 if(_iop_exception_state == 1) { frame = _iop_ex_def_frame; }
66 else { frame = _iop_ex_dbg_frame; }
74 _iop_exception_state = 0;
79void SBUS_dbg_init(
void)
81 iop_dbg_get_reg_frames(&_iop_ex_def_frame, &_iop_ex_dbg_frame);
82 SIF2_set_cmd_handler(SIF2_CMD_DBG_CTRL, &_sif2_cmd_dbg_control, NULL);