User manual
118
typedef volatile udword_t * volatile_udword_lp_t;
// Some additional types using in chapi library
typedef unsigned int chapi_timeout_t;
typedef unsigned long chapi_proc_t;
typedef HANDLE chapi_handle_t;
typedef HANDLE chapi_event_t;
Register access functions
word_t write_byte(int adr, byte_t byte, word_t word)
Where,
adr - is the address to write byte to;
byte - data to write to specified address;
word - word value to write data to;
This function is used to store specified byte properly in specified word. Specified address
is used to define if odd or even location of the word should be used to store byte to.
Return value represents the target word with properly written byte. This member is
commonly used to implement proper byte addressing within the device registers.
word_t read_byte(int adr, word_t word)
Where,
adr - is the address to read byte from;
word - word value to read data from;
This function is used to read the byte properly from specified word. Specified address is
used to define if odd or even location of the word should be used to read byte from.
Properly read byte is returned as a result of this call. This member is commonly used to
implement proper byte addressing within the device registers.
word_t read_reg(int adr, io_size_t type, word_t word)
Where,
adr - is the address of the register to read from;
type - the type of required access (see io_size_t definition above);
word - word value represented our register within the emulation;










