@@ -345,6 +345,16 @@ Adafruit_SSD1306::~Adafruit_SSD1306(void) {
345
345
346
346
// Issue single byte out SPI, either soft or hardware as appropriate.
347
347
// SPI transaction/selection must be performed in calling function.
348
+ /* !
349
+ @brief Write a single byte to the SPI port.
350
+
351
+ @param d
352
+ Data byte to be written.
353
+
354
+ @return void
355
+ @note See HAVE_PORTREG which defines if the method uses a port or bit-bang
356
+ method
357
+ */
348
358
inline void Adafruit_SSD1306::SPIwrite (uint8_t d) {
349
359
if (spi) {
350
360
(void )spi->transfer (d);
@@ -366,10 +376,18 @@ inline void Adafruit_SSD1306::SPIwrite(uint8_t d) {
366
376
}
367
377
}
368
378
369
- // Issue single command to SSD1306, using I2C or hard/soft SPI as needed.
370
- // Because command calls are often grouped, SPI transaction and selection
371
- // must be started/ended in calling function for efficiency.
372
- // This is a private function, not exposed (see ssd1306_command() instead).
379
+ /* !
380
+ @brief Issue single command to SSD1306, using I2C or hard/soft SPI as
381
+ needed. Because command calls are often grouped, SPI transaction and
382
+ selection must be started/ended in calling function for efficiency. This is a
383
+ protected function, not exposed (see ssd1306_command() instead).
384
+
385
+ @param c
386
+ the command character to send to the display.
387
+ Refer to ssd1306 data sheet for commands
388
+ @return None (void).
389
+ @note
390
+ */
373
391
void Adafruit_SSD1306::ssd1306_command1 (uint8_t c) {
374
392
if (wire) { // I2C
375
393
wire->beginTransmission (i2caddr);
@@ -382,8 +400,18 @@ void Adafruit_SSD1306::ssd1306_command1(uint8_t c) {
382
400
}
383
401
}
384
402
385
- // Issue list of commands to SSD1306, same rules as above re: transactions.
386
- // This is a private function, not exposed.
403
+ /* !
404
+ @brief Issue list of commands to SSD1306, same rules as above re:
405
+ transactions. This is a protected function, not exposed.
406
+ @param c
407
+ pointer to list of commands
408
+
409
+ @param n
410
+ number of commands in the list
411
+
412
+ @return None (void).
413
+ @note
414
+ */
387
415
void Adafruit_SSD1306::ssd1306_commandList (const uint8_t *c, uint8_t n) {
388
416
if (wire) { // I2C
389
417
wire->beginTransmission (i2caddr);
@@ -695,6 +723,23 @@ void Adafruit_SSD1306::drawFastHLine(int16_t x, int16_t y, int16_t w,
695
723
drawFastHLineInternal (x, y, w, color);
696
724
}
697
725
726
+ /* !
727
+ @brief Draw a horizontal line with a width and color. Used by public
728
+ methods drawFastHLine,drawFastVLine
729
+ @param x
730
+ Leftmost column -- 0 at left to (screen width - 1) at right.
731
+ @param y
732
+ Row of display -- 0 at top to (screen height -1) at bottom.
733
+ @param w
734
+ Width of line, in pixels.
735
+ @param color
736
+ Line color, one of: SSD1306_BLACK, SSD1306_WHITE or
737
+ SSD1306_INVERT.
738
+ @return None (void).
739
+ @note Changes buffer contents only, no immediate effect on display.
740
+ Follow up with a call to display(), or with other graphics
741
+ commands as needed by one's own application.
742
+ */
698
743
void Adafruit_SSD1306::drawFastHLineInternal (int16_t x, int16_t y, int16_t w,
699
744
uint16_t color) {
700
745
@@ -778,6 +823,22 @@ void Adafruit_SSD1306::drawFastVLine(int16_t x, int16_t y, int16_t h,
778
823
drawFastVLineInternal (x, y, h, color);
779
824
}
780
825
826
+ /* !
827
+ @brief Draw a vertical line with a width and color. Used by public method
828
+ drawFastHLine,drawFastVLine
829
+ @param x
830
+ Leftmost column -- 0 at left to (screen width - 1) at right.
831
+ @param __y
832
+ Row of display -- 0 at top to (screen height -1) at bottom.
833
+ @param __h height of the line in pixels
834
+ @param color
835
+ Line color, one of: SSD1306_BLACK, SSD1306_WHITE or
836
+ SSD1306_INVERT.
837
+ @return None (void).
838
+ @note Changes buffer contents only, no immediate effect on display.
839
+ Follow up with a call to display(), or with other graphics
840
+ commands as needed by one's own application.
841
+ */
781
842
void Adafruit_SSD1306::drawFastVLineInternal (int16_t x, int16_t __y,
782
843
int16_t __h, uint16_t color) {
783
844
0 commit comments