Skip to content

Commit d4fb682

Browse files
committed
Updated documentation
Descriptions of functions are updated.
1 parent 241dce2 commit d4fb682

File tree

9 files changed

+119
-9
lines changed

9 files changed

+119
-9
lines changed

src/Inkplate.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ void Inkplate::clearDisplay()
6565

6666
/**
6767
* @brief display function update display with new data from buffer
68+
*
69+
* @param bool leaveOn
70+
* if set to 1, it will disable turning supply for eink after
71+
* display update in order to save some time needed for power supply
72+
* to save some time at next display update or increase refreshing speed
6873
*/
6974
void Inkplate::display(bool leaveOn)
7075
{

src/boards/Inkplate10.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
* @brief begin function initialize Inkplate object with predefined
2828
* settings
2929
*
30+
* @param uint8_t lightWaveform
31+
* if inkplate doesn't work well or if it is fading after turning off
32+
* lightWaveform should be set to 1 in order to fix that, but older boards
33+
* may not support it
34+
*
3035
* @return True if initialization is successful, false if failed or already
3136
* initialized
3237
*/
@@ -198,6 +203,11 @@ void Graphics::writePixel(int16_t x0, int16_t y0, uint16_t color)
198203
/**
199204
*
200205
* @brief display1b function writes black and white data to display
206+
*
207+
* @param bool leaveOn
208+
* if set to 1, it will disable turning supply for eink after
209+
* display update in order to save some time needed for power supply
210+
* to save some time at next display update or increase refreshing speed
201211
*/
202212
void Inkplate::display1b(bool leaveOn)
203213
{
@@ -278,6 +288,11 @@ void Inkplate::display1b(bool leaveOn)
278288

279289
/**
280290
* @brief display3b function writes grayscale data to display
291+
*
292+
* @param bool leaveOn
293+
* if set to 1, it will disable turning supply for eink after
294+
* display update in order to save some time needed for power supply
295+
* to save some time at next display update or increase refreshing speed
281296
*/
282297
void IRAM_ATTR Inkplate::display3b(bool leaveOn)
283298
{
@@ -355,6 +370,11 @@ void IRAM_ATTR Inkplate::display3b(bool leaveOn)
355370
* For advanced use with deep sleep. Can force partial update in
356371
* deep sleep
357372
*
373+
* @param bool leaveOn
374+
* if set to 1, it will disable turning supply for eink after
375+
* display update in order to save some time needed for power supply
376+
* to save some time at next display update or increase refreshing speed
377+
*
358378
* @note Partial update only works in black and white mode
359379
*
360380
* @return Number of pixels changed from black to white, leaving blur

src/boards/Inkplate5.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ void Graphics::writePixel(int16_t x0, int16_t y0, uint16_t color)
192192
/**
193193
*
194194
* @brief display1b function writes black and white data to display
195+
*
196+
* @param bool leaveOn
197+
* if set to 1, it will disable turning supply for eink after
198+
* display update in order to save some time needed for power supply
199+
* to save some time at next display update or increase refreshing speed
200+
*
195201
*/
196202
void Inkplate::display1b(bool leaveOn)
197203
{
@@ -281,6 +287,11 @@ void Inkplate::display1b(bool leaveOn)
281287

282288
/**
283289
* @brief display3b function writes grayscale data to display
290+
*
291+
* @param bool leaveOn
292+
* if set to 1, it will disable turning supply for eink after
293+
* display update in order to save some time needed for power supply
294+
* to save some time at next display update or increase refreshing speed
284295
*/
285296
void IRAM_ATTR Inkplate::display3b(bool leaveOn)
286297
{
@@ -340,6 +351,11 @@ void IRAM_ATTR Inkplate::display3b(bool leaveOn)
340351
* For advanced use with deep sleep. Can force partial update in
341352
* deep sleep
342353
*
354+
* @param bool leaveOn
355+
* if set to 1, it will disable turning supply for eink after
356+
* display update in order to save some time needed for power supply
357+
* to save some time at next display update or increase refreshing speed
358+
*
343359
* @note Partial update only works in black and white mode
344360
*
345361
* @return Number of pixels changed from black to white, leaving blur

src/boards/Inkplate6.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,11 @@ void Graphics::writePixel(int16_t x0, int16_t y0, uint16_t color)
176176
/**
177177
*
178178
* @brief display1b function writes black and white data to display
179+
*
180+
* @param bool leaveOn
181+
* if set to 1, it will disable turning supply for eink after
182+
* display update in order to save some time needed for power supply
183+
* to save some time at next display update or increase refreshing speed
179184
*/
180185
void Inkplate::display1b(bool leaveOn)
181186
{
@@ -296,6 +301,11 @@ void Inkplate::display1b(bool leaveOn)
296301

297302
/**
298303
* @brief display3b function writes grayscale data to display
304+
*
305+
* @param bool leaveOn
306+
* if set to 1, it will disable turning supply for eink after
307+
* display update in order to save some time needed for power supply
308+
* to save some time at next display update or increase refreshing speed
299309
*/
300310
void Inkplate::display3b(bool leaveOn)
301311
{
@@ -357,6 +367,11 @@ void Inkplate::display3b(bool leaveOn)
357367
* For advanced use with deep sleep. Can force partial update in
358368
* deep sleep
359369
*
370+
* @param bool leaveOn
371+
* if set to 1, it will disable turning supply for eink after
372+
* display update in order to save some time needed for power supply
373+
* to save some time at next display update or increase refreshing speed
374+
*
360375
* @note Partial update only works in black and white mode
361376
*
362377
* @return Number of pixels changed from black to white, leaving blur

src/boards/Inkplate6plus.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,11 @@ void Inkplate::clean(uint8_t c, uint8_t rep)
260260
/**
261261
*
262262
* @brief display1b function writes black and white data to display
263+
*
264+
* @param bool leaveOn
265+
* if set to 1, it will disable turning supply for eink after
266+
* display update in order to save some time needed for power supply
267+
* to save some time at next display update or increase refreshing speed
263268
*/
264269
void Inkplate::display1b(bool leaveOn)
265270
{
@@ -350,6 +355,11 @@ void Inkplate::display1b(bool leaveOn)
350355

351356
/**
352357
* @brief display3b function writes grayscale data to display
358+
*
359+
* @param bool leaveOn
360+
* if set to 1, it will disable turning supply for eink after
361+
* display update in order to save some time needed for power supply
362+
* to save some time at next display update or increase refreshing speed
353363
*/
354364
void Inkplate::display3b(bool leaveOn)
355365
{
@@ -410,6 +420,11 @@ void Inkplate::display3b(bool leaveOn)
410420
* For advanced use with deep sleep. Can force partial update in
411421
* deep sleep
412422
*
423+
* @param bool leaveOn
424+
* if set to 1, it will disable turning supply for eink after
425+
* display update in order to save some time needed for power supply
426+
* to save some time at next display update or increase refreshing speed
427+
*
413428
* @note Partial update only works in black and white mode
414429
*
415430
* @return Number of pixels changed from black to white, leaving blur

src/boards/InkplateColor.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ bool Inkplate::begin(void)
116116

117117
/**
118118
* @brief display function update display with new data from buffer
119+
*
120+
* @param bool leaveOn
121+
* if set to 1, it will disable turning supply for eink after
122+
* display update in order to save some time needed for power supply
123+
* to save some time at next display update or increase refreshing speed
119124
*/
120125
void Inkplate::display(bool leaveOn)
121126
{

src/include/Graphics.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ uint8_t Graphics::getRotation()
7575
* x position, will change depending on rotation
7676
* @param int16_t y0
7777
* y position, will change depending on rotation
78+
*
79+
* @param uint16_t color
80+
* pixel color, in 3bit mode have values in range 0-7
7881
*/
7982
void Graphics::drawPixel(int16_t x0, int16_t y0, uint16_t color)
8083
{
@@ -97,8 +100,8 @@ void Graphics::startWrite()
97100
* rectangle width
98101
* @param int16_t h
99102
* rectangle height
100-
* @param int16_t c
101-
* rectangle grayscale color (1-7)
103+
* @param uint16_t color
104+
* pixel color, in 3bit mode have values in range 0-7
102105
*/
103106
void Graphics::writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
104107
{
@@ -117,8 +120,8 @@ void Graphics::writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_
117120
* starting y position for vertical line
118121
* @param int16_t h
119122
* vertical line height
120-
* @param int16_t c
121-
* vertical line grayscale color (1-7)
123+
* @param uint16_t color
124+
* pixel color, in 3bit mode have values in range 0-7
122125
*/
123126
void Graphics::writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
124127
{
@@ -136,8 +139,8 @@ void Graphics::writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
136139
* starting y position for horizontal line
137140
* @param int16_t w
138141
* horizontal line width
139-
* @param int16_t c
140-
* horizontal line grayscale color (1-7)
142+
* @param uint16_t color
143+
* pixel color, in 3bit mode have values in range 0-7
141144
*/
142145
void Graphics::writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
143146
{
@@ -156,8 +159,8 @@ void Graphics::writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
156159
* ending x position for line
157160
* @param int16_t y1
158161
* ending y position for line
159-
* @param int16_t c
160-
* line grayscale color (1-7)
162+
* @param uint16_t color
163+
* pixel color, in 3bit mode have values in range 0-7
161164
*/
162165
void Graphics::writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
163166
{

src/include/ImageDitherColor.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,17 @@ uint8_t Image::ditherGetPixelBmp(uint32_t px, int i, int j, int w, bool paletted
109109
/**
110110
* @brief ditherGetPixelJpeg finds dithered value for given pixel
111111
*
112+
* @param uint32_t px
113+
* pixel to find value for
114+
* @param int i
115+
* x plane pixel position
116+
* @param int j
117+
* y plane pixel position
118+
* @param int w
119+
* image width
120+
* @param bool paletted
121+
* 1 if palleted image, 0 if not
122+
*
112123
* @note currently not used
113124
*/
114125
uint8_t Image::ditherGetPixelJpeg(uint8_t px, int i, int j, int x, int y, int w, int h)

src/include/System.cpp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,20 @@ uint8_t System::rtcGetAlarmWeekday()
630630

631631
/**
632632
* @brief Sets the timer countdown
633+
*
634+
* @param rtcCountdownSrcClock source_clock
635+
* timer clock frequency
636+
*
637+
* @param timer clock frequency
638+
* value to write in timer register
639+
*
640+
* @param bool int_enable
641+
* timer interrupt enable, 0 means no interrupt generated from timer
642+
* , 1 means interrupt is generated from timer
643+
*
644+
* @param bool int_pulse
645+
* timer interrupt mode, 0 means interrupt follows timer flag
646+
* , 1 means interrupt generates a pulse
633647
*/
634648
void System::rtcTimerSet(rtcCountdownSrcClock source_clock, uint8_t value, bool int_enable, bool int_pulse)
635649
{
@@ -650,7 +664,7 @@ void System::rtcTimerSet(rtcCountdownSrcClock source_clock, uint8_t value, bool
650664
// reconfigure timer
651665
timer_reg[1] |= RTC_TIMER_TE; // enable timer
652666
if (int_enable)
653-
timer_reg[1] |= RTC_TIMER_TIE; // enable interrupr
667+
timer_reg[1] |= RTC_TIMER_TIE; // enable interrupt
654668
if (int_pulse)
655669
timer_reg[1] |= RTC_TIMER_TI_TP; // interrupt mode
656670
timer_reg[1] |= source_clock << 3; // clock source
@@ -792,6 +806,9 @@ void System::rtcReset() // datasheet 8.2.1.3.
792806

793807
/**
794808
* @brief Converts decimal to BCD
809+
*
810+
* @param uint8_t val
811+
* number which needs to be converted from decimal to Bcd value
795812
*/
796813
uint8_t System::rtcDecToBcd(uint8_t val)
797814
{
@@ -800,6 +817,9 @@ uint8_t System::rtcDecToBcd(uint8_t val)
800817

801818
/**
802819
* @brief Converts BCD to decimal
820+
*
821+
* @param uint8_t val
822+
* number which needs to be converted from Bcd to decimal value
803823
*/
804824
uint8_t System::rtcBcdToDec(uint8_t val)
805825
{

0 commit comments

Comments
 (0)