libws libws
WSwan hardware library for the Wonderful toolchain
|
#include <stdbool.h>
#include <stdint.h>
#include <wonderful.h>
#include "util.h"
#include "ports.h"
Go to the source code of this file.
Macros | |
#define | WS_INT_UART_TX 0 |
#define | WS_INT_KEY_SCAN 1 |
#define | WS_INT_CARTRIDGE 2 |
#define | WS_INT_UART_RX 3 |
#define | WS_INT_LINE_MATCH 4 |
#define | WS_INT_VBL_TIMER 5 |
#define | WS_INT_VBLANK 6 |
#define | WS_INT_HBL_TIMER 7 |
#define | ws_int_pop_enabled ws_int_enable_set |
Enumerations | |
enum | ws_system_model_t { WS_MODEL_MONO = 0x00 , WS_MODEL_PCV2 = 0x01 , WS_MODEL_COLOR = 0x82 , WS_MODEL_CRYSTAL = 0x83 } |
WonderSwan device model. More... | |
enum | ws_system_mode_t { WS_MODE_MONO = 0x00 , WS_MODE_COLOR = 0x80 , WS_MODE_COLOR_4BPP = 0xC0 , WS_MODE_COLOR_4BPP_PACKED = 0xE0 } |
WonderSwan system mode. More... |
Functions | |
static bool | ws_system_is_color_model (void) |
Check if this device is capable of supporting Color mode (= is a WonderSwan Color or above). | |
static bool | ws_system_is_color_active (void) |
Check if this device is currently in Color mode. | |
ws_system_model_t | ws_system_get_model (void) |
Get the device's model. | |
static ws_system_mode_t | ws_system_get_mode (void) |
Get the current system mode. | |
bool | ws_system_set_mode (ws_system_mode_t mode) |
Set the new system mode. | |
void | ws_int_set_handler (uint8_t idx, ia16_int_handler_t handler) |
Register a hardware interrupt handler. | |
void | ws_int_set_default_handler_serial_tx (void) |
Register a default interrupt handler for serial transmission. This handler will automatically disable and acknowledge HWINT_SERIAL_TX . | |
void | ws_int_set_default_handler_key (void) |
Register a default, acknowledge-only interrupt handler. | |
void | ws_int_set_default_handler_serial_rx (void) |
Register a default interrupt handler for serial receiving. This handler will automatically disable and acknowledge HWINT_SERIAL_RX . | |
void | ws_int_set_default_handler_line (void) |
Register a default, acknowledge-only interrupt handler. | |
void | ws_int_set_default_handler_vblank_timer (void) |
Register a default, acknowledge-only interrupt handler. | |
void | ws_int_set_default_handler_vblank (void) |
Register a default, acknowledge-only interrupt handler. | |
void | ws_int_set_default_handler_hblank_timer (void) |
Register a default, acknowledge-only interrupt handler. | |
static void | ws_int_set_enabled (uint8_t mask) |
Set selected hardware interrupts. | |
static uint8_t | ws_int_push_set_enabled (uint8_t mask) |
void | ws_int_enable (uint8_t mask) |
Enable selected hardware interrupts. | |
void | ws_int_disable (uint8_t mask) |
Disable selected hardware interrupts. | |
static void | ws_int_disable_all (void) |
Disable all hardware interrupts. | |
static void | ws_int_ack (uint8_t mask) |
Acknowledge hardware interrupt. |
Functionality related to system control.
Definition in file system.h.