libws libws
WSwan hardware library for the Wonderful toolchain
|
Go to the source code of this file.
Data Structures | |
struct | ws_eeprom_handle_t |
Enumerations | |
enum | ws_ieep_gender { WS_IEEP_GENDER_UNK = 0 , WS_IEEP_GENDER_MALE = 1 , WS_IEEP_GENDER_FEMALE = 2 } |
enum | ws_ieep_blood_type { WS_IEEP_BLOOD_TYPE_UNK = 0 , WS_IEEP_BLOOD_TYPE_A = 1 , WS_IEEP_BLOOD_TYPE_B = 2 , WS_IEEP_BLOOD_TYPE_0 = 3 , WS_IEEP_BLOOD_TYPE_AB = 4 } |
enum | ws_ieep_name_color { WS_IEEP_NAME_COLOR_BLACK = 0x00 , WS_IEEP_NAME_COLOR_RED = 0x01 , WS_IEEP_NAME_COLOR_ORANGE = 0x02 , WS_IEEP_NAME_COLOR_YELLOW = 0x03 , WS_IEEP_NAME_COLOR_LIME = 0x04 , WS_IEEP_NAME_COLOR_GREEN = 0x05 , WS_IEEP_NAME_COLOR_TEAL = 0x06 , WS_IEEP_NAME_COLOR_CYAN = 0x07 , WS_IEEP_NAME_COLOR_SEABLUE = 0x08 , WS_IEEP_NAME_COLOR_BLUE = 0x09 , WS_IEEP_NAME_COLOR_PURPLE = 0x0A , WS_IEEP_NAME_COLOR_PINK = 0x0B , WS_IEEP_NAME_COLOR_FUCHSIA = 0x0C , WS_IEEP_NAME_COLOR_WHITE = 0x0D } |
Functions | |
ws_eeprom_handle_t | ws_eeprom_handle_internal (void) |
static ws_eeprom_handle_t | ws_eeprom_handle_cartridge (uint8_t bits) |
uint16_t | ws_eeprom_read_word (ws_eeprom_handle_t handle, uint16_t address) |
Read an aligned word from the EEPROM. | |
uint8_t | ws_eeprom_read_byte (ws_eeprom_handle_t handle, uint16_t address) |
Read a byte from the EEPROM. | |
void | ws_eeprom_read_data (ws_eeprom_handle_t handle, uint16_t address, uint8_t *data, uint16_t length) |
Read bytes from the EEPROM. | |
bool | ws_eeprom_write_word (ws_eeprom_handle_t handle, uint16_t address, uint16_t value) |
Write a word to the EEPROM. | |
bool | ws_eeprom_erase_word (ws_eeprom_handle_t handle, uint16_t address) |
Erase a word from the EEPROM, setting it to 0xFFFF. | |
bool | ws_eeprom_write_lock (ws_eeprom_handle_t handle) |
Lock the EEPROM, preventing writes and erases. | |
bool | ws_eeprom_write_unlock (ws_eeprom_handle_t handle) |
Unlock the EEPROM, allowing writes and erases. | |
void | ws_ieep_read_owner_name (uint8_t *data) |
Read the owner name, as raw data. | |
void | ws_ieep_read_owner_name_ascii (char *str) |
Read the owner name, as an ASCII string. | |
uint16_t | ws_ieep_name_color_to_rgb (uint8_t value) |
Convert a given name color to its RGB value. | |
static void | ws_ieep_set_protect (void) |
Protect the non-cartridge area of the internal EEPROM. | |
static bool | ws_ieep_is_protected (void) |
Check if the non-cartridge area of the internal EEPROM is currently protected. |
Functionality related to EEPROM.
Definition in file eeprom.h.
enum ws_ieep_blood_type |
enum ws_ieep_gender |
enum ws_ieep_name_color |
Possible IEEPROM name color values.