9#ifndef __LIBDRAGON_INTERRUPT_H
10#define __LIBDRAGON_INTERRUPT_H
569#define RESET_TIME_LENGTH TICKS_FROM_MS(200)
602static inline __attribute__((deprecated(
"calling init_interrupts no longer required")))
603void init_interrupts() {}
605static inline __attribute__((deprecated(
"use register_RESET_handler instead")))
606void register_reset_handler(
void (*callback)() )
interrupt_state_t
State of interrupts on the system.
Definition interrupt.h:56
@ INTERRUPTS_DISABLED
Interrupts are currently disabled.
Definition interrupt.h:60
@ INTERRUPTS_ENABLED
Interrupts are currently enabled.
Definition interrupt.h:62
@ INTERRUPTS_UNINITIALIZED
Interrupt controller has not been initialized.
Definition interrupt.h:58
void unregister_AI_handler(void(*callback)())
Unregister an AI callback.
Definition interrupt.c:403
void unregister_SI_handler(void(*callback)())
Unegister a SI callback.
Definition interrupt.c:443
void register_CART_handler(void(*callback)())
Register a CART interrupt callback.
Definition interrupt.c:469
void enable_interrupts()
Enable interrupts systemwide.
Definition interrupt.c:751
void unregister_TI_handler(void(*callback)())
Unregister a timer callback.
Definition interrupt.c:464
void register_AI_handler(void(*callback)())
Register an AI callback.
Definition interrupt.c:398
void set_SP_interrupt(int active)
Enable or disable the SP interrupt.
Definition interrupt.c:618
void set_BB_MD_interrupt(int active)
Enable or disable the BBPlayer MD interrupt.
Definition interrupt.c:694
void set_SI_interrupt(int active)
Enable or disable the SI interrupt.
Definition interrupt.c:613
uint32_t exception_reset_time(void)
Check whether the RESET button was pressed and how long we are into the reset process.
Definition interrupt.c:791
void unregister_RESET_handler(void(*callback)())
Unregister a RESET interrupt callback.
Definition interrupt.c:492
void register_BB_USB1_handler(void(*callback)())
Register a BBPlayer USB1 callback.
Definition interrupt.c:555
void register_PI_handler(void(*callback)())
Register a PI callback.
Definition interrupt.c:418
void unregister_BB_USB1_handler(void(*callback)())
Unregister a BBPlayer USB1 interrupt callback.
Definition interrupt.c:560
void register_BB_IDE_handler(void(*callback)())
Register a BBPlayer IDE callback.
Definition interrupt.c:525
void unregister_VI_handler(void(*callback)())
Unregister a VI callback.
Definition interrupt.c:413
void register_BB_USB0_handler(void(*callback)())
Register a BBPlayer USB0 callback.
Definition interrupt.c:545
void set_BB_USB0_interrupt(int active)
Enable or disable the BBPlayer USB0 interrupt.
Definition interrupt.c:679
void disable_interrupts()
Disable interrupts systemwide.
Definition interrupt.c:726
void unregister_DP_handler(void(*callback)())
Unregister a DP callback.
Definition interrupt.c:433
void register_BB_PI_ERR_handler(void(*callback)())
Register a BBPlayer PI Error callback.
Definition interrupt.c:535
void set_TI_interrupt(int active)
Enable or disable the timer interrupt.
Definition interrupt.c:623
void set_PI_interrupt(int active)
Enable or disable the PI interrupt.
Definition interrupt.c:603
void unregister_PI_handler(void(*callback)())
Unegister a PI callback.
Definition interrupt.c:423
void unregister_CART_handler(void(*callback)())
Unregister a CART interrupt callback.
Definition interrupt.c:474
void set_BB_AES_interrupt(int active)
Enable or disable the BBPlayer AES interrupt.
Definition interrupt.c:664
void unregister_BB_BTN_handler(void(*callback)())
Unregister a BBPlayer BTN interrupt callback.
Definition interrupt.c:570
void set_AI_interrupt(int active)
Enable or disable the AI interrupt.
Definition interrupt.c:585
void register_BB_MD_handler(void(*callback)())
Register a BBPlayer MD callback.
Definition interrupt.c:575
void register_BB_AES_handler(void(*callback)())
Register a BBPlayer AES callback.
Definition interrupt.c:515
void register_BB_FLASH_handler(void(*callback)())
Register a BBPlayer FLASH callback.
Definition interrupt.c:505
void register_TI_handler(void(*callback)())
Register a timer callback.
Definition interrupt.c:459
void unregister_BB_MD_handler(void(*callback)())
Unregister a BBPlayer MD interrupt callback.
Definition interrupt.c:580
void unregister_BB_USB0_handler(void(*callback)())
Unregister a BBPlayer USB0 interrupt callback.
Definition interrupt.c:550
void set_BB_IDE_interrupt(int active)
Enable or disable the BBPlayer IDE interrupt.
Definition interrupt.c:669
void register_RESET_handler(void(*callback)())
Register a handler that will be called when the user presses the RESET button.
Definition interrupt.c:479
void set_BB_USB1_interrupt(int active)
Enable or disable the BBPlayer USB1 interrupt.
Definition interrupt.c:684
void set_BB_FLASH_interrupt(int active)
Enable or disable the BBPlayer FLASH interrupt.
Definition interrupt.c:659
void register_VI_handler(void(*callback)())
Register a VI callback.
Definition interrupt.c:408
void set_BB_BTN_interrupt(int active)
Enable or disable the BBPlayer BTN interrupt.
Definition interrupt.c:689
void register_BB_BTN_handler(void(*callback)())
Register a BBPlayer BTN callback.
Definition interrupt.c:565
void set_CART_interrupt(int active)
Enable or disable the CART interrupt.
Definition interrupt.c:635
void unregister_BB_FLASH_handler(void(*callback)())
Unregister a BBPlayer FLASH interrupt callback.
Definition interrupt.c:510
void unregister_BB_IDE_handler(void(*callback)())
Unregister a BBPlayer IDE interrupt callback.
Definition interrupt.c:530
void set_BB_PI_ERR_interrupt(int active)
Enable or disable the BBPlayer PI Error interrupt.
Definition interrupt.c:674
void set_DP_interrupt(int active)
Enable or disable the DP interrupt.
Definition interrupt.c:608
void unregister_SP_handler(void(*callback)())
Unegister a SP callback.
Definition interrupt.c:453
void unregister_BB_PI_ERR_handler(void(*callback)())
Unregister a BBPlayer PI Error interrupt callback.
Definition interrupt.c:540
void set_RESET_interrupt(int active)
Enable the RESET interrupt.
Definition interrupt.c:647
void register_SI_handler(void(*callback)())
Register a SI callback.
Definition interrupt.c:438
void unregister_BB_AES_handler(void(*callback)())
Unregister a BBPlayer AES interrupt callback.
Definition interrupt.c:520
void register_SP_handler(void(*callback)())
Register a SP callback.
Definition interrupt.c:448
void register_DP_handler(void(*callback)())
Register a DP callback.
Definition interrupt.c:428
void set_VI_interrupt(int active, unsigned long line)
Enable or disable the VI interrupt.
Definition interrupt.c:590
interrupt_state_t get_interrupts_state()
Return the current state of interrupts.
Definition interrupt.c:774