summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/local/hdmi_if.h
blob: fc23c80145a3f01f764d7b53e53949fb59ebef6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * This file is @generated automatically.
 * Do not modify anything in here by hand.
 *
 * Created from source file
 *   freebsd-org/sys/dev/hdmi/hdmi_if.m
 * with
 *   makeobjops.awk
 *
 * See the source file for legal information
 */


#ifndef _hdmi_if_h_
#define _hdmi_if_h_


#include <sys/eventhandler.h>

typedef void (*hdmi_event_hook)(void *, device_t, int);
EVENTHANDLER_DECLARE(hdmi_event, hdmi_event_hook);

#define HDMI_EVENT_CONNECTED	0

/** @brief Unique descriptor for the HDMI_GET_EDID() method */
extern struct kobjop_desc hdmi_get_edid_desc;
/** @brief A function implementing the HDMI_GET_EDID() method */
typedef int hdmi_get_edid_t(device_t dev, uint8_t **edid,
                            uint32_t *edid_length);

static __inline int HDMI_GET_EDID(device_t dev, uint8_t **edid,
                                  uint32_t *edid_length)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,hdmi_get_edid);
	rc = ((hdmi_get_edid_t *) _m)(dev, edid, edid_length);
	return (rc);
}

/** @brief Unique descriptor for the HDMI_SET_VIDEOMODE() method */
extern struct kobjop_desc hdmi_set_videomode_desc;
/** @brief A function implementing the HDMI_SET_VIDEOMODE() method */
typedef int hdmi_set_videomode_t(device_t dev,
                                 const struct videomode *videomode);

static __inline int HDMI_SET_VIDEOMODE(device_t dev,
                                       const struct videomode *videomode)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,hdmi_set_videomode);
	rc = ((hdmi_set_videomode_t *) _m)(dev, videomode);
	return (rc);
}

/** @brief Unique descriptor for the HDMI_ENABLE() method */
extern struct kobjop_desc hdmi_enable_desc;
/** @brief A function implementing the HDMI_ENABLE() method */
typedef int hdmi_enable_t(device_t dev, int onoff);

static __inline int HDMI_ENABLE(device_t dev, int onoff)
{
	kobjop_t _m;
	int rc;
	KOBJOPLOOKUP(((kobj_t)dev)->ops,hdmi_enable);
	rc = ((hdmi_enable_t *) _m)(dev, onoff);
	return (rc);
}

#endif /* _hdmi_if_h_ */