libs/epaper/src/epaper.c
/**
 *  @brief: private function to specify the memory area for data R/W
 */
@brief: private function to specify the memory area for data R/W
@brief : private function to specify the memory area for data R / W
void mgos_epd_set_memory_area(const int x_start, const int y_start, const int x_end, const int y_end)
{
	mgos_epd_send_command(SET_RAM_X_ADDRESS_START_END_POSITION);
	mgos_epd_send_data((x_start >> 3) & 0xFF);
	mgos_epd_send_data((x_end >> 3) & 0xFF);
	mgos_epd_send_command(SET_RAM_Y_ADDRESS_START_END_POSITION);
	mgos_epd_send_data(y_start & 0xFF);
	mgos_epd_send_data((y_start >> 8) & 0xFF);
	mgos_epd_send_data(y_end & 0xFF);
	mgos_epd_send_data((y_end >> 8) & 0xFF);
}
void mgos_epd_set_memory_area ( const int x_start , const int y_start , const int x_end , const int y_end ) { mgos_epd_send_command ( SET_RAM_X_ADDRESS_START_END_POSITION ) ; mgos_epd_send_data ( ( x_start >> 3 ) & 0xFF ) ; mgos_epd_send_data ( ( x_end >> 3 ) & 0xFF ) ; mgos_epd_send_command ( SET_RAM_Y_ADDRESS_START_END_POSITION ) ; mgos_epd_send_data ( y_start & 0xFF ) ; mgos_epd_send_data ( ( y_start >> 8 ) & 0xFF ) ; mgos_epd_send_data ( y_end & 0xFF ) ; mgos_epd_send_data ( ( y_end >> 8 ) & 0xFF ) ; }
@brief: private function to specify the memory area for data R/W
@brief : private function to specify the memory area for data R / W
/* x point must be the multiple of 8 or the last 3 bits will be ignored */