Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of capstone_display by
display.h@2:c3231b95aff0, 2014-04-03 (annotated)
- Committer:
- jmoffat
- Date:
- Thu Apr 03 20:42:39 2014 +0000
- Revision:
- 2:c3231b95aff0
- Parent:
- 1:a6f341df1ef1
- Child:
- 3:ee53c9811f62
Added documentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jmoffat | 0:6846cd4549ba | 1 | #include "st7735.h" |
jmoffat | 0:6846cd4549ba | 2 | |
jmoffat | 0:6846cd4549ba | 3 | class display |
jmoffat | 0:6846cd4549ba | 4 | { |
jmoffat | 0:6846cd4549ba | 5 | ST7735_LCD *lcd; |
jmoffat | 1:a6f341df1ef1 | 6 | char *debugstr; |
jmoffat | 0:6846cd4549ba | 7 | char *strength; |
jmoffat | 0:6846cd4549ba | 8 | char *dist; |
jmoffat | 0:6846cd4549ba | 9 | |
jmoffat | 0:6846cd4549ba | 10 | public: |
jmoffat | 0:6846cd4549ba | 11 | |
jmoffat | 0:6846cd4549ba | 12 | display(ST7735_LCD *disp); |
jmoffat | 0:6846cd4549ba | 13 | |
jmoffat | 2:c3231b95aff0 | 14 | /** |
jmoffat | 2:c3231b95aff0 | 15 | *Debug print that prints text in center of screen. |
jmoffat | 2:c3231b95aff0 | 16 | *Will overwrite old text. |
jmoffat | 2:c3231b95aff0 | 17 | */ |
jmoffat | 0:6846cd4549ba | 18 | void print(char *str); |
jmoffat | 2:c3231b95aff0 | 19 | /** |
jmoffat | 2:c3231b95aff0 | 20 | *Test function that prints a string repeatedly in a rainbow fashion. |
jmoffat | 2:c3231b95aff0 | 21 | */ |
jmoffat | 0:6846cd4549ba | 22 | void printrb(const char *str); |
jmoffat | 2:c3231b95aff0 | 23 | /** |
jmoffat | 2:c3231b95aff0 | 24 | *Debug function that blinks text. |
jmoffat | 2:c3231b95aff0 | 25 | */ |
jmoffat | 0:6846cd4549ba | 26 | void blinktext(const char *str); |
jmoffat | 0:6846cd4549ba | 27 | |
jmoffat | 2:c3231b95aff0 | 28 | /** |
jmoffat | 2:c3231b95aff0 | 29 | *Displays the the strength on the screen, on the first line. |
jmoffat | 2:c3231b95aff0 | 30 | *newStrength is the number in the form of a string, with units as |
jmoffat | 2:c3231b95aff0 | 31 | *desired. Prints in format "Strength:newStrength". Will overwrite old |
jmoffat | 2:c3231b95aff0 | 32 | *value automatically. |
jmoffat | 2:c3231b95aff0 | 33 | */ |
jmoffat | 1:a6f341df1ef1 | 34 | void displayStr(char *newStrength); |
jmoffat | 1:a6f341df1ef1 | 35 | |
jmoffat | 2:c3231b95aff0 | 36 | /** |
jmoffat | 2:c3231b95aff0 | 37 | *Works identically to displayStrength, but on second line with distance. |
jmoffat | 2:c3231b95aff0 | 38 | *Prints in format "Dist:newDist". Units must be in string as desired. |
jmoffat | 2:c3231b95aff0 | 39 | *Will overwrite old value automatically. |
jmoffat | 2:c3231b95aff0 | 40 | */ |
jmoffat | 1:a6f341df1ef1 | 41 | void displayDist(char * newDist); |
jmoffat | 0:6846cd4549ba | 42 | }; |