@@ -1008,15 +1008,15 @@ void MicroOLED::scrollStop(void)
10081008
10091009Set row start to row stop on the OLED to scroll right. Refer to http://learn.microview.io/intro/general-overview-of-microview.html for explanation of the rows.
10101010*/
1011- void MicroOLED::scrollRight (uint8_t start, uint8_t stop)
1011+ void MicroOLED::scrollRight (uint8_t start, uint8_t stop, uint8_t scrollInterval )
10121012{
10131013 if (stop < start) // stop must be larger or equal to start
10141014 return ;
10151015 scrollStop (); // need to disable scrolling before starting to avoid memory corrupt
10161016 command (RIGHTHORIZONTALSCROLL);
10171017 command (0x00 );
10181018 command (start);
1019- command (0x7 ); // scroll speed frames , TODO
1019+ command (scrollInterval);
10201020 command (stop);
10211021 command (0x00 );
10221022 command (0xFF );
@@ -1027,34 +1027,33 @@ void MicroOLED::scrollRight(uint8_t start, uint8_t stop)
10271027
10281028Set row start to row stop on the OLED to scroll vert right.
10291029*/
1030- void MicroOLED::scrollVertRight (uint8_t start, uint8_t stop)
1030+ void MicroOLED::scrollVertRight (uint8_t start, uint8_t stop, uint8_t scrollInterval )
10311031{
10321032 if (stop < start) // stop must be larger or equal to start
10331033 return ;
10341034 scrollStop (); // need to disable scrolling before starting to avoid memory corrupt
10351035 command (VERTICALRIGHTHORIZONTALSCROLL);
10361036 command (0x00 );
10371037 command (start);
1038- command (0x7 ); // scroll speed frames , TODO
1038+ command (scrollInterval);
10391039 command (stop);
1040- command (0x00 );
1041- command (0xFF );
1040+ command (0x01 ); // Vertical scrolling offset
10421041 command (ACTIVATESCROLL);
10431042}
10441043
10451044/* * \brief Left scrolling.
10461045
10471046Set row start to row stop on the OLED to scroll left.
10481047*/
1049- void MicroOLED::scrollLeft (uint8_t start, uint8_t stop)
1048+ void MicroOLED::scrollLeft (uint8_t start, uint8_t stop, uint8_t scrollInterval )
10501049{
10511050 if (stop < start) // stop must be larger or equal to start
10521051 return ;
10531052 scrollStop (); // need to disable scrolling before starting to avoid memory corrupt
10541053 command (LEFT_HORIZONTALSCROLL);
10551054 command (0x00 );
10561055 command (start);
1057- command (0x7 ); // scroll speed frames , TODO
1056+ command (scrollInterval);
10581057 command (stop);
10591058 command (0x00 );
10601059 command (0xFF );
@@ -1065,18 +1064,17 @@ void MicroOLED::scrollLeft(uint8_t start, uint8_t stop)
10651064
10661065Set row start to row stop on the OLED to scroll vert left.
10671066*/
1068- void MicroOLED::scrollVertLeft (uint8_t start, uint8_t stop)
1067+ void MicroOLED::scrollVertLeft (uint8_t start, uint8_t stop, uint8_t scrollInterval )
10691068{
10701069 if (stop < start) // stop must be larger or equal to start
10711070 return ;
10721071 scrollStop (); // need to disable scrolling before starting to avoid memory corrupt
10731072 command (VERTICALLEFTHORIZONTALSCROLL);
10741073 command (0x00 );
10751074 command (start);
1076- command (0x7 ); // scroll speed frames , TODO
1075+ command (scrollInterval);
10771076 command (stop);
1078- command (0x00 );
1079- command (0xFF );
1077+ command (0x01 ); // Vertical scrolling offset
10801078 command (ACTIVATESCROLL);
10811079}
10821080
0 commit comments