Listing 2: I/O functions for operation on I/O circuitry with buffers or multiple registers. Ex. a peripheral chip with linear hardware buffers

/* Read operations on hardware buffers: */
unsigned char iordbuf8( access_type, unsigned int index);
unsigned int  iordbuf16(access_type, unsigned int index);
unsigned long iordbuf32(access_type, unsigned int index);

/* Write operations on hardware buffers: */
void iowrbuf8( access_type, unsigned int index, unsigned char val);
void iowrbuf16(access_type, unsigned int index, unsigned int val);
void iowrbuf32(access_type, unsigned int index, unsigned long val);

/* AND operations on hardware buffers: */
void ioandbuf8(access_type, unsigned int index, unsigned char val);
void ioandbuf16(access_type, unsigned int index, unsigned int val);
void ioandbuf32(access_type, unsigned int index,unsigned long val);

/* OR operations on hardware buffers: */
void ioorbuf8(access_type, unsigned int index, unsigned char dat);
void ioorbuf16(access_type, unsigned int index, unsigned int dat);
void ioorbuf32(access_type, unsigned int index, unsigned long dat);

/* End of File */