PETRONE_V2 / Protocol / Structs / Display
Modified : 2018.02.14
Controller display to introduce control and the related definitions and structure.
Definitions
Display::Pixel::Type
Pixel color
namespace Display
{
namespace Pixel
{
enum Type
{
Black,
White
};
}
}
Display::Font::Type
Font
namespace Display
{
namespace Font
{
enum Type
{
LiberationMono5x8,
LiberationMono10x16,
};
}
}
Display::Align::Type
String align
namespace Display
{
namespace Align
{
enum Type
{
Left,
Center,
Right
};
}
}
Display::Line::Type
Line
namespace Display
{
namespace Line
{
enum Type
{
Solid,
Dotted,
Dashed,
};
}
}
Structs
Protocol::Display::ClearAll
Clear screen
namespace Protocol
{
namespace Display
{
struct ClearAll
{
u8 pixel;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
pixel | Display::Pixel::Type | - | 1 Byte | Fill color |
Protocol::Display::Clear
선택 영역 지우기
namespace Protocol
{
namespace Display
{
struct Clear
{
s16 x;
s16 y;
s16 width;
s16 height;
u8 pixel;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
x | int16_t | -2000 ~ 2000 | 2 Byte | X axis start position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis start position |
width | int16_t | -2000 ~ 2000 | 2 Byte | Width |
height | int16_t | -2000 ~ 2000 | 2 Byte | Height |
pixel | Display::Pixel::Type | - | 1 Byte | Pixel color |
Protocol::Display::Invert
Invert select area
namespace Protocol
{
namespace Display
{
struct Invert
{
s16 x;
s16 y;
s16 width;
s16 height;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
x | int16_t | -2000 ~ 2000 | 2 Byte | X axis start position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis start position |
width | int16_t | -2000 ~ 2000 | 2 Byte | Width |
height | int16_t | -2000 ~ 2000 | 2 Byte | Height |
Protocol::Display::DrawPoint
Draw point
namespace Protocol
{
namespace Display
{
struct DrawPoint
{
s16 x;
s16 y;
u8 pixel;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
x | int16_t | -2000 ~ 2000 | 2 Byte | X axis position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis position |
pixel | Display::Pixel::Type | - | 1 Byte | Pixel color |
Protocol::Display::DrawLine
Draw line
namespace Protocol
{
namespace Display
{
struct DrawLine
{
s16 x1;
s16 y1;
s16 x2;
s16 y2;
u8 pixel;
u8 line;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
x | int16_t | -2000 ~ 2000 | 2 Byte | X axis start position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis satrt position |
x2 | int16_t | -2000 ~ 2000 | 2 Byte | X axis end position |
y2 | int16_t | -2000 ~ 2000 | 2 Byte | Y axis end position |
pixel | Display::Pixel::Type | - | 1 Byte | line color |
line | Display::Line::Type | - | 1 Byte | line type |
Protocol::Display::DrawRect
Draw rectangle
namespace Protocol
{
namespace Display
{
struct DrawRect
{
s16 x;
s16 y;
s16 width;
s16 height;
u8 pixel;
u8 flagFill;
u8 line;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
x | int16_t | -2000 ~ 2000 | 2 Byte | X axis position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis position |
width | int16_t | -2000 ~ 2000 | 2 Byte | Width |
height | int16_t | -2000 ~ 2000 | 2 Byte | Height |
pixel | Display::Pixel::Type | - | 1 Byte | Pixel color |
flagFill | uint8_t | - | 1 Byte | 0(do not fill), 1(fill) |
line | Display::Line::Type | - | 1 Byte | line type |
Protocol::Display::DrawCircle
Draw circle
namespace Protocol
{
namespace Display
{
struct DrawCircle
{
s16 x;
s16 y;
s16 radius;
u8 pixel;
u8 flagFill;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
x | int16_t | -2000 ~ 2000 | 2 Byte | X axis center position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis center position |
radius | int16_t | 1 ~ 2000 | 2 Byte | Radius |
pixel | Display::Pixel::Type | - | 1 Byte | Pixel color |
flagFill | uint8_t | - | 1 Byte | 0(do not fill), 1(fill) |
Protocol::Display::DrawString
Draw string
Send strings to display on the screen with ASCII strings attached after drawString structures. The length of the header must have a value (Protocol::Display::DrawString length + Display string length).
namespace Protocol
{
namespace Display
{
struct DrawString
{
s16 x;
s16 y;
u8 font;
u8 pixel;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
x | int16_t | -2000 ~ 2000 | 2 Byte | X axis position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis position |
font | Display::Font::Type | - | 1 Byte | Font |
pixel | Display::Pixel::Type | - | 1 Byte | Font color |
message | ASCII String | - | Less than 30 Byte | String |
Protocol::Display::DrawStringAlign
Draw string with align
The string is placed in the align designated location between xStart and xEnd. Send strings to display on the screen with ASCII strings attached after drawString structures. The length of the header must have a value (Protocol::Display::DrawStringAlign length + Display string length).
namespace Protocol
{
namespace Display
{
struct DrawStringAlign
{
s16 xStart;
s16 xEnd;
s16 y;
u8 align;
u8 font;
u8 pixel;
};
}
}
Variable Name | Type | Range | Size | Description |
---|---|---|---|---|
xStart | int16_t | -2000 ~ 2000 | 2 Byte | X axis start position |
xEnd | int16_t | -2000 ~ 2000 | 2 Byte | X axis end position |
y | int16_t | -2000 ~ 2000 | 2 Byte | Y axis position |
align | Display::Align::Type | - | 1 Byte | Align |
font | Display::Font::Type | - | 1 Byte | Font |
pixel | Display::Pixel::Type | - | 1 Byte | Font color |
message | ASCII String | - | Less than 30 Byte | String |
PETRONE V2
- Intro
- Typedef
- DataType
- Definitions
- Structs
- Structs - Light
- Structs - Display