User Tools

Site Tools


wswan:guide:interrupt_handlers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
wswan:guide:interrupt_handlers [2024/02/17 13:25] asiewswan:guide:interrupt_handlers [2025/11/07 15:14] (current) asie
Line 1: Line 1:
 ====== Writing interrupt handlers ====== ====== Writing interrupt handlers ======
- 
- 
  
 ===== C interrupt handlers ===== ===== C interrupt handlers =====
  
-For less performance-sensitive interrupts (such as the vertical blank interrupt), it is possible tow rite the relevant handlers using only C. This is done by marking the interrupt function with special attributes:+For less performance-sensitive interrupts (such as the vertical blank interrupt), it is possible to write the relevant handlers using only C. This is done by marking the interrupt function with special attributes:
  
 <code C> <code C>
Line 13: Line 11:
          
     // Acknowledge the hardware interrupt.     // Acknowledge the hardware interrupt.
-    ws_hwint_ack(HWINT_VBLANK);+    ws_int_ack(WS_INT_ACK_VBLANK);
 } }
 </code> </code>
Line 29: Line 27:
 <code C> <code C>
 // Set the function "vblank_int_handler" to run during vertical blank. // Set the function "vblank_int_handler" to run during vertical blank.
-ws_hwint_set_handler(HWINT_IDX_VBLANK, (ws_int_handler_t) vblank_int_handler);+ws_int_set_handler(WS_INT_VBLANK, (ws_int_handler_t) vblank_int_handler);
  
 // Enable the vertical blank hardware interrupt. // Enable the vertical blank hardware interrupt.
-ws_hwint_enable(HWINT_VBLANK);+ws_int_enable(WS_INT_ENABLE_VBLANK);
  
 // Disable the vertical blank hardware interrupt. // Disable the vertical blank hardware interrupt.
-ws_hwint_disable(HWINT_VBLANK);+ws_int_disable(WS_INT_ENABLE_VBLANK);
 </code> </code>
 +
  
wswan/guide/interrupt_handlers.1708176351.txt.gz · Last modified: by asie