RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Macros | Variables
main_rtc.c File Reference
#include <stdio.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <rtems.h>
#include <rtems/rtc.h>
#include <rtems/error.h>
#include <rtems/shell.h>

Macros

#define RTEMS_RTC_SHELL_ERROR(fmt, ...)
 
#define RTEMS_RTC_SHELL_ERROR_SC(sc, fmt, ...)
 

Variables

struct rtems_shell_cmd_tt rtems_shell_RTC_Command
 

Detailed Description

Real time clock shell command.

Macro Definition Documentation

◆ RTEMS_RTC_SHELL_ERROR

#define RTEMS_RTC_SHELL_ERROR (   fmt,
  ... 
)
Value:
do { \
printf( "error: " fmt "\n", ##__VA_ARGS__); \
return -1; \
} while (0)

◆ RTEMS_RTC_SHELL_ERROR_SC

#define RTEMS_RTC_SHELL_ERROR_SC (   sc,
  fmt,
  ... 
)
Value:
if ((sc) != RTEMS_SUCCESSFUL) { \
printf( "error: " fmt ": %s\n", ##__VA_ARGS__, rtems_status_text( sc)); \
return -1; \
}
const char * rtems_status_text(rtems_status_code status_code)
Maps the status code to a descriptive text.
Definition: statustext.c:76
@ RTEMS_SUCCESSFUL
This status code indicates successful completion of a requested operation.
Definition: status.h:90

Variable Documentation

◆ rtems_shell_RTC_Command

struct rtems_shell_cmd_tt rtems_shell_RTC_Command
Initial value:
= {
.name = "rtc",
.usage = rtems_rtc_shell_usage,
.topic = "misc",
.command = rtems_rtc_shell_main,
.alias = NULL,
.next = NULL
}