clear_buffer poprawione, dodano color
This commit is contained in:
@@ -20,7 +20,7 @@ void tearDown(void)
|
||||
void test_wrtie_to_buffer_at_pos_0_0_height_8pt(void)
|
||||
{
|
||||
// uint8_t data[8] = {};
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 0);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 0, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
||||
@@ -29,14 +29,14 @@ void test_wrtie_to_buffer_at_pos_0_0_height_8pt(void)
|
||||
void test_wrtie_to_buffer_at_pos_1_0_height_8pt(void)
|
||||
{
|
||||
// uint8_t data[8] = {};
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 1);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 1, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_7_0_height_8pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 7);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 7, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_7_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
@@ -44,7 +44,7 @@ void test_wrtie_to_buffer_at_pos_7_0_height_8pt(void)
|
||||
void test_wrtie_to_buffer_at_pos_0_0_height_16pt(void)
|
||||
{
|
||||
// uint8_t data[8] = {};
|
||||
ssd1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 0);
|
||||
SSD1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 0, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_16pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
||||
@@ -53,14 +53,14 @@ void test_wrtie_to_buffer_at_pos_0_0_height_16pt(void)
|
||||
void test_wrtie_to_buffer_at_pos_1_0_height_16pt(void)
|
||||
{
|
||||
// uint8_t data[8] = {};
|
||||
ssd1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 1);
|
||||
SSD1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 1, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_16pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_7_0_height_16pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 7);
|
||||
SSD1306_write_to_buffer(picture_16pt, SSD1306_LCDWIDTH, 16, 0, 7, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_7_16pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ void test_wrtie_to_buffer_at_pos_7_0_height_16pt(void)
|
||||
void test_wrtie_to_buffer_at_pos_0_0_height_12pt(void)
|
||||
{
|
||||
// uint8_t data[8] = {};
|
||||
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 0);
|
||||
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 0, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_0_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
||||
@@ -77,7 +77,7 @@ void test_wrtie_to_buffer_at_pos_0_0_height_12pt(void)
|
||||
void test_wrtie_to_buffer_at_pos_1_0_height_12pt(void)
|
||||
{
|
||||
// uint8_t data[8] = {};
|
||||
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 1);
|
||||
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 1, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_1_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
@@ -85,7 +85,7 @@ void test_wrtie_to_buffer_at_pos_1_0_height_12pt(void)
|
||||
void test_wrtie_to_buffer_at_pos_0_4_height_12pt(void)
|
||||
{
|
||||
// uint8_t data[8] = {};
|
||||
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 4);
|
||||
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 4, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_UINT8_ARRAY(posX_0_posY_4_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
// TEST_ASSERT_EQUAL_UINT8(0xFF, buffer_oled[8]);
|
||||
@@ -93,42 +93,49 @@ void test_wrtie_to_buffer_at_pos_0_4_height_12pt(void)
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_7_0_height_12pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 7);
|
||||
SSD1306_write_to_buffer(picture_12pt, SSD1306_LCDWIDTH, 12, 0, 7, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_0_posY_7_12pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_minus1_0_height_8pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -1);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -1, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_0_posY_minus1_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_minus7_0_height_8pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -7);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -7, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_0_posY_minus7_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_minus8_0_height_8pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -8);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, -8, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_HEX8_ARRAY(buffer_oled, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_0_minus1_height_8pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, -1, 0);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, -1, 0, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_minus1_posY_0_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_60_minus1_height_8pt(void)
|
||||
{
|
||||
ssd1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, -1, 60);
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, -1, 60, WHITE);
|
||||
|
||||
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_minus1_posY_60_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
|
||||
void test_wrtie_to_buffer_at_pos_0_0_inverse_height_8pt(void)
|
||||
{
|
||||
SSD1306_write_to_buffer(picture_8pt, SSD1306_LCDWIDTH, 8, 0, 0, INVERSE);
|
||||
|
||||
TEST_ASSERT_EQUAL_HEX8_ARRAY(posX_0_posY_0_inverse_8pt, buffer_oled, SSD1306_BUF_SIZE);
|
||||
}
|
||||
Reference in New Issue
Block a user