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.
Dependencies: mbed
Fork of WaG by
Diff: display.cpp
- Revision:
- 15:100321eb2aac
- Parent:
- 14:be27f6e21a8a
- Child:
- 16:dfa9eb1a808d
--- a/display.cpp Tue Feb 27 17:06:37 2018 +0000 +++ b/display.cpp Tue Feb 27 17:12:15 2018 +0000 @@ -8,7 +8,7 @@ * Purpose: Contain function definitions * * Created: 02/21/2018 -* Last Modified: 02/21/2018 +* Last Modified: 02/27/2018 * ******************************************************************************/ #include "mbed.h" @@ -97,8 +97,6 @@ * Globals: * * Outputs: - * Parameters: - * Globals: * Returns: void */ void bin2bcd_array(int num, char bcd[]) { @@ -112,27 +110,6 @@ } #endif -/* - * int convert(int dec); - * Description: - * - * Inputs: - * Parameters: - * int dec: - * Globals: - * - * Outputs: - * Parameters: - * Globals: - * Returns: void -*/ -int convert(int dec) {//convert decimal to binary - if (dec == 0) //function complete - return 0; - else //recursive call until converted - return (dec % 2 + 10 * convert(dec / 2) + ' '); -} - #ifdef VERSION2 /* * void bin2bcd_array(int num); @@ -142,7 +119,7 @@ * Inputs: * Parameters: * int num: number in binary format - * int &bcd: pointer to bcd (binary coded decimal) array + * char bcd[]: bcd (binary coded decimal) array * * Outputs: * Returns: void @@ -171,6 +148,18 @@ } #endif +/* + * void send_command_to_display(char bcd[]); + * Description: send bcd[] array to the display driver to display number + * in the display + * + * Inputs: + * Parameters: + * char bcd[]: bcd (binary coded decimal) array + * + * Outputs: + * Returns: void +*/ void send_command_to_display(char bcd[]) { int command;