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
wswan:guide:interrupt_handlers [2024/02/18 08:32] 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 =====
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>
- 
-<WRAP round important> 
-Watch out! ''ws_hwint_set_handler'' expects a ''HWINT_IDX'' parameter, while most other ''ws_hwint'' operations - ''enable'', ''disable'', ''ack'' - expect a ''HWINT'' parameter. 
- 
-I admit, this is a little confusing. ^^; 
-</WRAP> 
  
  
wswan/guide/interrupt_handlers.txt · Last modified: by asie