mirror of
https://github.com/gryf/wmtemp.git
synced 2025-12-18 12:00:26 +01:00
Attempt to use nvclock code for reading GPU temperature, since running
nvidia-settings couple of times for a second is highly inefficient.
This commit is contained in:
76
nvclock/xfree.h
Normal file
76
nvclock/xfree.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/* NVTV xfree -- Dirk Thierbach <dthierbach@gmx.de>
|
||||
*
|
||||
* Header: All definitions from xfree that are needed.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _XFREE_H
|
||||
#define _XFREE_H 1
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define xf86Msg(type,format,args...) /* */
|
||||
#define xf86DrvMsg(scrnIndex,type,format, args...) /* */
|
||||
|
||||
#ifndef Bool
|
||||
# ifndef _XTYPEDEF_BOOL
|
||||
# define _XTYPEDEF_BOOL
|
||||
typedef int Bool;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _XTYPEDEF_POINTER
|
||||
# define _XTYPEDEF_POINTER
|
||||
typedef void *pointer;
|
||||
#endif
|
||||
|
||||
|
||||
/* Flags for driver messages */
|
||||
typedef enum {
|
||||
X_PROBED, /* Value was probed */
|
||||
X_CONFIG, /* Value was given in the config file */
|
||||
X_DEFAULT, /* Value is a default */
|
||||
X_CMDLINE, /* Value was given on the command line */
|
||||
X_NOTICE, /* Notice */
|
||||
X_ERROR, /* Error message */
|
||||
X_WARNING, /* Warning message */
|
||||
X_INFO, /* Informational message */
|
||||
X_NONE, /* No prefix */
|
||||
X_NOT_IMPLEMENTED /* Not implemented */
|
||||
} MessageType;
|
||||
|
||||
typedef union _DevUnion {
|
||||
pointer ptr;
|
||||
long val;
|
||||
unsigned long uval;
|
||||
pointer (*fptr)(void);
|
||||
} DevUnion;
|
||||
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
void xf86usleep(unsigned long usec);
|
||||
void xf86getsecs(long * secs, long * usecs);
|
||||
|
||||
#define xcalloc(_num, _size) calloc(_num, _size)
|
||||
#define xfree(_ptr) free(_ptr)
|
||||
|
||||
|
||||
/* ---------------- nv driver files ---------------- */
|
||||
|
||||
/**** nv_dac.c */
|
||||
|
||||
#define DDC_SDA_READ_MASK (1 << 3)
|
||||
#define DDC_SCL_READ_MASK (1 << 2)
|
||||
#define DDC_SDA_WRITE_MASK (1 << 4)
|
||||
#define DDC_SCL_WRITE_MASK (1 << 5)
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user