libkysdk-system/man/hardware/kdk_board_get_date.3

55 lines
1.3 KiB
Groff

.TH "KDK_BOARD_GET_DATE" 3 "Thu Aug 24 2023" "Linux Programmer's Manual" \"
.SH NAME
kdk_board_get_date - 获取主板生产日期
.SH SYNOPSIS
.nf
.B #include <libkyboard.h>
.sp
.BI "extern const char* kdk_board_get_date();"
.sp
Link with \fI\-lkyhw\fP.
.SH "Detailed Description"
The main function of the interface is to obtain the production date of the mainboard
.SH "RETURN VALUE"
On success, return the production date of the mainboard of type char*; The returned string needs to be released by
.I free
.PP
On error, return
.BR NULL.
.SH EXAMPLES
.EX
#include "stdio.h"
#include "libkyboard.h"
int main()
{
char *name = kdk_board_get_name();
char *vendor = kdk_board_get_vendor();
char *date = kdk_board_get_date();
char *serial = kdk_board_get_serial();
printf("name : %s", name);
printf("vendor : %s", vendor);
printf("date : %s", date);
printf("serial : %s", serial);
free(name);
free(vendor);
free(date);
free(serial);
return 0;
}
.SH "CONFORMING TO"
These functions are as per the withdrawn POSIX.1e draft specification.
The following functions are Linux extensions:
.BR kdk_board_get_vendor (),
.BR kdk_board_get_name (),
.BR kdk_board_get_serial ()
and
.BR kdk_board_free ().
.SH "SEE ALSO"
.BR kdk_board_get_vendor (3),
.BR kdk_board_get_name (3),
.BR kdk_board_get_serial (3)
and
.BR kdk_board_free (3).