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.
Diff: Maple.h
- Revision:
- 1:aefa1992ce0f
- Parent:
- 0:0be38b583cf7
- Child:
- 3:eec13a411e94
--- a/Maple.h Sun Sep 25 11:37:21 2011 +0000 +++ b/Maple.h Mon Oct 10 11:45:51 2011 +0000 @@ -1,27 +1,35 @@ +//copyright 2011 Uehara Yoshiyuki +//==================================================================== +//The author provide the programs without any guarantees or warranty. +//The author is not responsible for any damage or losses of any kind +//caused by using or misusing of the programs. +//The author is under no obligation to provide support, service, +//corrections, or upgrades to the programs. +//==================================================================== // MAPLE board[MARM01-BASE] -// +// common functions #ifndef MAPLE_H_ #define MAPLE_H_ //prototypes -char char_to_hex1(int c); -void char_to_hex(int c, char h[]); +char* copy_string(char destination_string[], int destination_position, int copy_length, const char source_string[]); +char int_to_hex1(int i); +char* int_to_hex2(int i, char h[]); int bcd_to_int(char b); char int_to_bcd(int i); -char increment_bcd(char bcd_data, char bcd_min, char bcd_max); -char decrement_bcd(char bcd_data, char bcd_min, char bcd_max); -void int_to_weekday2(int weekday, char s[]); -void int_to_weekday3(int weekday, char s[]); -int bcd_to_year(char century, char bcd_year); +char xxcrement_bcd(int flag, char bcd_data, char bcd_min, char bcd_max); +const char* weekday_to_string(int w, const char* s); +int bcd_to_year(char bcd_century, char bcd_year); bool leap_year(int year); int days_in_month(int year, int month); -char bcd_days_in_month(char century, char bcd_year, char bcd_month); -int bcd_date_to_weekday(char century, char bcd_year, char bcd_month, char bcd_day); +char bcd_days_in_month(char bcd_century, char bcd_year, char bcd_month); +int bcd_date_to_weekday(char bcd_century, char bcd_year, char bcd_month, char bcd_day); +//prototypes for test void RTC_to_LCD_raw(); void LCD_display_all_char_shift(); static void LCD_display_32char_shift(char base); -void LCD_display_all_char(); +void LCD_display_all_char(); static void LCD_display_32char(char base); #endif