llvm-mos-sdk
irq.h
Go to the documentation of this file.
1 #include <stdbool.h>
2 
3 #ifndef _IRQ_H_
4 #define _IRQ_H_
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 // Set the reload value for the timer IRQ.
12 
13 // Set the control bits for the timer IRQ.
14 void fds_set_timer_irq_ctrl(bool enabled, bool repeat);
15 
16 #define NMI_ACTION_VINTWAIT 0b00000000
17 #define NMI_ACTION_USER_1 0b01000000
18 #define NMI_ACTION_USER_2 0b10000000
19 #define NMI_ACTION_USER_3 0b11000000
20 
21 // Set action on NMI. Should be one of NMI_ACTION_VINTWAIT,
22 // NMI_ACTION_USER_1, NMI_ACTION_USER_2, or NMI_ACTION_USER_3.
23 void fds_set_nmi_action(char action);
24 
25 #define IRQ_ACTION_DISK_TRANSFER 0b01000000
26 #define IRQ_ACTION_ACK_DELAY 0b10000000
27 #define IRQ_ACTION_USER 0b11000000
28 
29 // Set action on IRQ. Should be one of IRQ_ACTION_DISK_TRANSFER,
30 // IRQ_ACTION_ACK_DELAY, or IRQ_ACTION_USER. Alternatively, a 6-bit
31 // value can be passed to use the "skip bytes" action, which will
32 // skip the given amount of bytes on disk.
33 void fds_set_irq_action(char action);
34 
35 #define RESET_TYPE_HARD 0xAC
36 #define RESET_TYPE_SOFT 0x53
37 
38 // Set reset type. Should be one of RESET_TYPE_HARD
39 // or RESET_TYPE_SOFT.
40 void fds_set_reset_type(char type);
41 
42 #ifdef __cplusplus
43 }
44 #endif
45 
46 #endif
char value
Definition: bios.h:265
void fds_set_timer_irq_ctrl(bool enabled, bool repeat)
void fds_set_irq_action(char action)
void fds_set_nmi_action(char action)
void fds_set_reset_type(char type)
void fds_set_timer_irq_reload(unsigned value)