/* Read/Modify/Write a byte on the display controller. 
This function will read the byte from the display controller (or the framebuffer if we cannot read directly from the controller) and do a mask operation on the byte according to the pixel operation selected by the color argument and the pixel mask provided. */
void gfx_mono_st7565r_mask_byte(gfx_coord_t page, gfx_coord_t column, gfx_mono_color_t pixel_mask, gfx_mono_color_t color)
/* Read/Modify/Write a byte on the display controller. 
This function will read the byte from the display controller (or the framebuffer if we cannot read directly from the controller) and do a mask operation on the byte according to the pixel operation selected by the color argument and the pixel mask provided. */
void gfx_mono_st7565r_mask_byte(gfx_coord_t page, gfx_coord_t column, gfx_mono_color_t pixel_mask, gfx_mono_color_t color)
{
	gfx_mono_color_t temp = gfx_mono_get_byte(page, column);
	switch (color) {
	case GFX_PIXEL_SET:
		temp |= pixel_mask;
		break;
	case GFX_PIXEL_CLR:
		temp &= ~pixel_mask;
		break;
	case GFX_PIXEL_XOR:
		temp ^= pixel_mask;
		break;
	default:
		break;
	}
	gfx_mono_put_byte(page, column, temp);
}