little comments

This commit is contained in:
Angoosh Leviocki 2021-07-16 12:04:56 +02:00
parent 3d4681f82d
commit db141c586d

View File

@ -53,6 +53,9 @@ void PrintRxBuffer(){
pointr = 0;
}
/**
* @brief Printf function implementation
*/
void myprintf(const char *fmt, ...) {
static char buffer[256];
va_list args;
@ -67,17 +70,20 @@ void myprintf(const char *fmt, ...) {
char dateChar[9];
char timeChar[9];
/**
* @brief Get time function
* @param return string containing time
* @param return string containing date
*/
void get_time(char* timeChar, char* dateChar)
{
RTC_DateTypeDef gDate;
RTC_TimeTypeDef gTime;
/* Get the RTC current Time */
HAL_RTC_GetTime(&hrtc, &gTime, RTC_FORMAT_BIN);
/* Get the RTC current Date */
HAL_RTC_GetDate(&hrtc, &gDate, RTC_FORMAT_BIN);
/* Display time Format: hh:mm:ss */
sprintf((char*)timeChar,"%02d:%02d:%02d",gTime.Hours, gTime.Minutes, gTime.Seconds);
/* Display date Format: dd-mm-yy */
sprintf((char*)dateChar,"%02d-%02d-%2d",gDate.Date, gDate.Month, 2000 + gDate.Year);
}
/**
@ -535,6 +541,9 @@ void ReadBuffer(){
}
}
/**
* @brief Initialize terminal
*/
void TerminalInit(){
uint8_t msgWelcome[] = {"\nWelcome to terminal utility by Angoosh\nLIBRARY VERSION: "};
uint8_t msgTermVersion[] = {LIB_VERSION};
@ -558,6 +567,10 @@ void TerminalInit(){
//FATFS
/**
* @brief list files
*/
FRESULT ls_files (
char* path /* Start node to be scanned (***also used as work area***) */
)