Updated documentation

This commit is contained in:
Ajith Vasudevan 2021-02-16 22:50:35 +05:30
parent 6430d008c0
commit c07bebf51c
1 changed files with 13 additions and 13 deletions

View File

@ -51,27 +51,27 @@
Clears the display, command: "DisplayClear" Clears the display, command: "DisplayClear"
DisplayNumber num [,position {0-(NUM_DIGITS-1))} [,leading_zeros {0|1} [,length {1-NUM_DIGITS}]]] DisplayNumber num [,position {0-(NUM_DIGITS-1))} [,leading_zeros {0|1} [,length {1 to NUM_DIGITS}]]]
Clears and then displays number without decimal. command e.g., "DisplayNumber 1234" Clears and then displays number without decimal. command e.g., "DisplayNumber 1234"
Control 'leading zeros', 'length' and 'position' with "DisplayNumber 1234, <position>, <leadingZeros>, <length>" Control 'leading zeros', 'length' and 'position' with "DisplayNumber 1234, <position>, <leadingZeros>, <length>"
'leading zeros' can be 1 or 0 (default), 'length' can be 1 to NUM_DIGITS, 'position' can be 0 (left-most) to NUM_DIGITS (right-most). 'leading zeros' can be 1 or 0 (default), 'length' can be 1 to NUM_DIGITS, 'position' can be 0 (left-most) to NUM_DIGITS (right-most).
See function description below for more details. See function description below for more details.
DisplayNumberNC num [,position {0-(NUM_DIGITS-1))} [,leading_zeros {0|1} [,length {1-NUM_DIGITS}]]] DisplayNumberNC num [,position {0-(NUM_DIGITS-1))} [,leading_zeros {0|1} [,length {1 to NUM_DIGITS}]]]
Display integer number as above, but without clearing first. e.g., "DisplayNumberNC 1234". Usage is same as above. Display integer number as above, but without clearing first. e.g., "DisplayNumberNC 1234". Usage is same as above.
DisplayFloat num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1-NUM_DIGITS}]]] DisplayFloat num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1 to NUM_DIGITS}]]]
Clears and then displays float (with decimal point) command e.g., "DisplayFloat 12.34" Clears and then displays float (with decimal point) command e.g., "DisplayFloat 12.34"
See function description below for more details. See function description below for more details.
DisplayFloatNC num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1-NUM_DIGITS}]]] DisplayFloatNC num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1 to NUM_DIGITS}]]]
Displays float (with decimal point) as above, but without clearing first. command e.g., "DisplayFloatNC 12.34" Displays float (with decimal point) as above, but without clearing first. command e.g., "DisplayFloatNC 12.34"
See function description below for more details. See function description below for more details.
@ -84,7 +84,7 @@
DisplayRaw position {0-(NUM_DIGITS-1)},length {1-NUM_DIGITS}, num1 [, num2[, num3[, num4[, ...upto NUM_DIGITS numbers]]]]] DisplayRaw position {0-(NUM_DIGITS-1)},length {1 to NUM_DIGITS}, num1 [, num2[, num3[, num4[, ...upto NUM_DIGITS numbers]]]]]
Takes upto NUM_DIGITS comma-separated integers (0-255) and displays raw segments. Each number represents a Takes upto NUM_DIGITS comma-separated integers (0-255) and displays raw segments. Each number represents a
7-segment digit. Each 8-bit number represents individual segments of a digit. 7-segment digit. Each 8-bit number represents individual segments of a digit.
@ -92,7 +92,7 @@
DisplayText text [, position {0-(NUM_DIGITS-1)} [,length {1-NUM_DIGITS}]] DisplayText text [, position {0-(NUM_DIGITS-1)} [,length {1 to NUM_DIGITS}]]
Clears and then displays basic text. command e.g., "DisplayText ajith vasudevan" Clears and then displays basic text. command e.g., "DisplayText ajith vasudevan"
Control 'length' and 'position' with "DisplayText <text>, <position>, <length>" Control 'length' and 'position' with "DisplayText <text>, <position>, <length>"
@ -100,7 +100,7 @@
DisplayTextNC text [, position {0-NUM_DIGITS-1} [,length {1-NUM_DIGITS}]] DisplayTextNC text [, position {0-NUM_DIGITS-1} [,length {1 to NUM_DIGITS}]]
Clears first, then displays text. Usage is same as above. Clears first, then displays text. Usage is same as above.
@ -187,8 +187,8 @@ bool TM1637Init(void) {
/*********************************************************************************************\ /*********************************************************************************************\
* Displays number without decimal, with/without leading zeros, specifying start-position * Displays number without decimal, with/without leading zeros, specifying start-position
* and length, optionally skipping clearing display before displaying the number. * and length, optionally skipping clearing display before displaying the number.
* commands: DisplayNumber num [,position {0-(NUM_DIGITS-1)} [,leading_zeros {0|1} [,length {1-NUM_DIGITS}]]] * commands: DisplayNumber num [,position {0-(NUM_DIGITS-1)} [,leading_zeros {0|1} [,length {1 to NUM_DIGITS}]]]
* DisplayNumberNC num [,position {0-(NUM_DIGITS-1)} [,leading_zeros {0|1} [,length {1-NUM_DIGITS}]]] // "NC" --> "No Clear" * DisplayNumberNC num [,position {0-(NUM_DIGITS-1)} [,leading_zeros {0|1} [,length {1 to NUM_DIGITS}]]] // "NC" --> "No Clear"
\*********************************************************************************************/ \*********************************************************************************************/
bool CmndTM1637Number(bool clear) { bool CmndTM1637Number(bool clear) {
char sNum[CMD_MAX_LEN]; char sNum[CMD_MAX_LEN];
@ -256,8 +256,8 @@ bool CmndTM1637Number(bool clear) {
/*********************************************************************************************\ /*********************************************************************************************\
* Displays number with decimal, specifying position, precision and length, * Displays number with decimal, specifying position, precision and length,
* optionally skipping clearing display before displaying the number. * optionally skipping clearing display before displaying the number.
* commands: DisplayFloat num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1-NUM_DIGITS}]]] * commands: DisplayFloat num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1 to NUM_DIGITS}]]]
* DisplayFloatNC num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1-NUM_DIGITS}]]] // "NC" --> "No Clear" * DisplayFloatNC num [,position {0-(NUM_DIGITS-1)} [,precision {0-NUM_DIGITS} [,length {1 to NUM_DIGITS}]]] // "NC" --> "No Clear"
\*********************************************************************************************/ \*********************************************************************************************/
bool CmndTM1637Float(bool clear) { bool CmndTM1637Float(bool clear) {
@ -448,7 +448,7 @@ bool CmndTM1637Level(void) {
/*********************************************************************************************\ /*********************************************************************************************\
* Display arbitrary data on the display module * Display arbitrary data on the display module
* Command: DisplayRaw position {0-(NUM_DIGITS-1)},length {1-NUM_DIGITS}, a [, b[, c[, d[...upto NUM_DIGITS]]]] * Command: DisplayRaw position {0-(NUM_DIGITS-1)},length {1 to NUM_DIGITS}, a [, b[, c[, d[...upto NUM_DIGITS]]]]
* where a,b,c,d... are upto NUM_DIGITS numbers in the range 0-255, each number (byte) * where a,b,c,d... are upto NUM_DIGITS numbers in the range 0-255, each number (byte)
* corresponding to a single 7-segment digit. Within each byte, bit 0 is segment A, * corresponding to a single 7-segment digit. Within each byte, bit 0 is segment A,
* bit 1 is segment B etc. The function may either set the entire display * bit 1 is segment B etc. The function may either set the entire display
@ -530,7 +530,7 @@ bool CmndTM1637Raw(void) {
* Display a given string. * Display a given string.
* Text can be placed at arbitrary location on the display using the length and * Text can be placed at arbitrary location on the display using the length and
* position parameters without affecting the rest of the display. * position parameters without affecting the rest of the display.
* Command: DisplayText text [, position {0-(NUM_DIGITS-1)} [,length {1-NUM_DIGITS}]] * Command: DisplayText text [, position {0-(NUM_DIGITS-1)} [,length {1 to NUM_DIGITS}]]
\*********************************************************************************************/ \*********************************************************************************************/
bool CmndTM1637Text(bool clear) { bool CmndTM1637Text(bool clear) {
char sString[CMD_MAX_LEN + 1]; char sString[CMD_MAX_LEN + 1];