at24cm0x 1.0
at24cm0x driver library
Loading...
Searching...
No Matches
frame.h
Go to the documentation of this file.
1
18
19#ifndef FRAME_H_
20#define FRAME_H_
21
22 #ifndef FRAME_WIDTH
32 #define FRAME_WIDTH SSD130X_COLUMN_SIZE
33 #endif
34
35 #ifndef FRAME_HEIGHT
45 #define FRAME_HEIGHT SSD130X_ROW_SIZE
46 #endif
47
48 #ifndef FRAME_SPECIFIC_BACKGROUND
60 // #define FRAME_SPECIFIC_BACKGROUND
61
62 #ifdef _DOXYGEN_ // Used for documentation, can be ignored
63 #define FRAME_SPECIFIC_BACKGROUND
64 #endif
65 #endif
66
67 #ifdef FRAME_SPECIFIC_BACKGROUND
68 #ifndef FRAME_SPECIFIC_BACKGROUND_IN_PROGMEM
78 // #define FRAME_SPECIFIC_BACKGROUND_IN_PROGMEM
79
80 #ifdef _DOXYGEN_ // Used for documentation, can be ignored
81 #define FRAME_SPECIFIC_BACKGROUND_IN_PROGMEM
82 #endif
83 #endif
84 #endif
85
86 #ifndef FRAME_NUMERIC_ENABLE_FLOATING_POINT
96 //#define FRAME_NUMERIC_ENABLE_FLOATING_POINT
97
98 #ifdef _DOXYGEN_ // Used for documentation, can be ignored
99 #define FRAME_NUMERIC_ENABLE_FLOATING_POINT
100 #endif
101
102 #ifndef FRAME_NUMERIC_PRECISION
112 #define FRAME_NUMERIC_PRECISION 2
113 #endif
114 #endif
115
116 #include <stdlib.h>
117 #include <string.h>
118 #include <avr/pgmspace.h>
119
120 #include "../ssd130x.h"
121 #include "../../font/font.h"
125
139
145
146 void frame_init(void);
147 void frame_draw_char(const char character, GFX_Point position);
148 void frame_draw_text(const char *text, GFX_Point position);
149 void frame_draw_number(const void* number, unsigned char length, NUMERIC_Type type, NUMERIC_Radix radix, GFX_Point position);
150 void frame_draw_number_uint(const unsigned int number, unsigned char length, NUMERIC_Radix radix, GFX_Point position);
151 void frame_draw_number_int(const int number, unsigned char length, NUMERIC_Radix radix, GFX_Point position);
152 void frame_draw_bar(GFX_Point position, GFX_Size size, unsigned char percent);
153 void frame_clear(void);
154
155#endif /* FRAME_H_ */
Enumeration definitions for various numerical data types.
enum NUMERIC_Type_t NUMERIC_Type
Alias for enum NUMERIC_Type_t representing various number data types.
Definition datatypes.h:45
Header file defining basic structures for 2D graphic elements.
struct GFX_Size_t GFX_Size
Alias for struct GFX_Size_t representing a drawing area/size.
Definition elements.h:54
struct GFX_Point_t GFX_Point
Alias for struct GFX_Point_t representing a drawing point.
Definition elements.h:37
Header file for font handling and character bitmap retrieval.
enum FRAME_Number_Operation_t FRAME_Number_Operation
Alias for enum FRAME_Number_Operation_t representing numeric operation modes.
Definition frame.h:144
void frame_draw_bar(GFX_Point position, GFX_Size size, unsigned char percent)
Draws a horizontal progress bar on the SSD130X display.
Definition frame.c:489
void frame_init(void)
Initializes the frame system and SSD130X display.
Definition frame.c:181
void frame_clear(void)
Clears the entire display frame.
Definition frame.c:450
void frame_draw_text(const char *text, GFX_Point position)
Renders a text string on the SSD130X display at a specified position.
Definition frame.c:214
void frame_draw_number_int(const int number, unsigned char length, NUMERIC_Radix radix, GFX_Point position)
Inline helper function to draw a signed integer number on the SSD130X display.
Definition frame.c:395
void frame_draw_number_uint(const unsigned int number, unsigned char length, NUMERIC_Radix radix, GFX_Point position)
Inline helper function to draw an unsigned integer number on the SSD130X display.
Definition frame.c:378
FRAME_Number_Operation_t
Specifies the numeric operation modes for number rendering.
Definition frame.h:134
@ FRAME_Number_Operation_Signed
Definition frame.h:136
@ FRAME_Number_Operation_Decimal
Definition frame.h:135
@ FRAME_Number_Operation_Unsigned
Definition frame.h:137
void frame_draw_number(const void *number, unsigned char length, NUMERIC_Type type, NUMERIC_Radix radix, GFX_Point position)
Renders a formatted number on the SSD130X display at a specified position.
Definition frame.c:290
void frame_draw_char(const char character, GFX_Point position)
Renders a single character on the SSD130X display at a specified position.
Definition frame.c:235
Enumeration for numerical radix options.
enum NUMERIC_Radix_t NUMERIC_Radix
Alias for enum NUMERIC_Radix_t representing numerical radix options.
Definition radix.h:41
Header file for SSD130X display control via hardware or software TWI/I2C.