libws libws
WSwan hardware library for the Wonderful toolchain
|
Data Structures | |
struct | ws_eeprom_handle_t |
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. | |
bool ws_eeprom_erase_word | ( | ws_eeprom_handle_t | handle, |
uint16_t | address ) |
Erase a word from the EEPROM, setting it to 0xFFFF.
address | The address to erase. |
|
inlinestatic |
ws_eeprom_handle_t ws_eeprom_handle_internal | ( | void | ) |
uint8_t ws_eeprom_read_byte | ( | ws_eeprom_handle_t | handle, |
uint16_t | address ) |
Read a byte from the EEPROM.
address | The address to read from. |
void ws_eeprom_read_data | ( | ws_eeprom_handle_t | handle, |
uint16_t | address, | ||
uint8_t * | data, | ||
uint16_t | length ) |
Read bytes from the EEPROM.
address | The address to read from. |
data | The pointer to write to. |
length | The number of bytes to read. |
uint16_t ws_eeprom_read_word | ( | ws_eeprom_handle_t | handle, |
uint16_t | address ) |
Read an aligned word from the EEPROM.
address | The address to read from. The lowest bit is ignored. |
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.
bool ws_eeprom_write_word | ( | ws_eeprom_handle_t | handle, |
uint16_t | address, | ||
uint16_t | value ) |
Write a word to the EEPROM.
address | The address to write to. The lowest bit is ignored. |
value | The word to write. |