7 #ifdef __FUNCTION__WORKING
8 #define PRINT_FUNCTION_START smprintf(s, "Entering %s\n", __FUNCTION__);
9 #define PRINT_FUNCTION_END smprintf(s, "Leaving %s\n", __FUNCTION__);
11 #define PRINT_FUNCTION_START smprintf(s, "Entering %s:%d\n", __FILE__, __LINE__);
12 #define PRINT_FUNCTION_END smprintf(s, "Leaving %s:%d\n", __FILE__, __LINE__);
14 #define PRINT_MEMORY_INFO() smprintf(s, "Location = %d, Memory type = %s\n", entry->Location, GSM_MemoryTypeToString(entry->MemoryType));
15 #define PRINT_TODO_INFO() smprintf(s, "Location = %d\n", ToDo->Location);
16 #define PRINT_CALENDAR_INFO() smprintf(s, "Location = %d\n", Note->Location);
17 #define PRINT_NOTE_INFO() smprintf(s, "Location = %d\n", Note->Location);
18 #define PRINT_MSMS_INFO() smprintf(s, "Number = %d, Location = %d, Folder = %d\n", sms->Number, sms->SMS[0].Location, sms->SMS[0].Folder);
19 #define PRINT_SMS_INFO() smprintf(s, "Location = %d, Folder = %d\n", sms->Location, sms->Folder);
20 #define PRINT_START() if (start) smprintf(s, "Starting reading!\n");
27 #define PRINT_LOG_ERROR(err) \
29 GSM_LogError(s, __FUNCTION__, err); \
37 #define CHECK_PHONE_CONNECTION() \
39 PRINT_FUNCTION_START \
40 if (!GSM_IsConnected(s)) { \
41 return ERR_NOTCONNECTED; \
49 #define RUN_RESTARTABLE(return_value, function_call) \
52 for (restarts = 0; restarts < 10; ++restarts) { \
53 unsigned useconds = 10000 << restarts; \
54 return_value = (function_call); \
55 if (return_value != ERR_BUSY) \
57 smprintf(s, "Sleeping %d ms before retrying the last command\n", useconds / 1000); \
738 smprintf(s,
"Location = %d, Folder = %d\n", Location, Folder);