Root/
Source at commit 1166 created 13 years 10 days ago. By meklort, Fixed recent Makefile changes. Please do not use /Users/evan/SourceCode/tmp/chameleon/trunk or VPATH. the *only* time you should use /Users/evan/SourceCode/tmp/chameleon/trunk is when setting the SRCROOT variable. Also note that very soon make pkg is going to be removed. The pkg build script in trunk is very out of date. Instead please use the package maker at http://forge.voodooprojects.org/p/chameleonApplications/. Once this is ready for trunk it will be merged. | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2005 Apple Computer, Inc. All Rights Reserved.␊ |
3 | */␊ |
4 | ␊ |
5 | #ifndef __DEVICE_TREE_H␊ |
6 | #define __DEVICE_TREE_H␊ |
7 | ␊ |
8 | #include <stdbool.h>␊ |
9 | #include <stdint.h>␊ |
10 | ␊ |
11 | typedef struct _Property {␊ |
12 | const char * name;␊ |
13 | uint32_t length;␊ |
14 | void * value;␊ |
15 | ␊ |
16 | struct _Property * next;␊ |
17 | } Property;␊ |
18 | ␊ |
19 | typedef struct _Node {␊ |
20 | struct _Property * properties;␊ |
21 | struct _Property * last_prop;␊ |
22 | ␊ |
23 | struct _Node * children;␊ |
24 | ␊ |
25 | struct _Node * next;␊ |
26 | } Node;␊ |
27 | ␊ |
28 | ␊ |
29 | extern Property *␊ |
30 | DT__AddProperty(Node *node, const char *name, uint32_t length, void *value);␊ |
31 | ␊ |
32 | extern Node *␊ |
33 | DT__AddChild(Node *parent, const char *name);␊ |
34 | ␊ |
35 | Node *␊ |
36 | DT__FindNode(const char *path, bool createIfMissing);␊ |
37 | ␊ |
38 | extern void␊ |
39 | DT__FreeProperty(Property *prop);␊ |
40 | ␊ |
41 | extern void␊ |
42 | DT__FreeNode(Node *node);␊ |
43 | ␊ |
44 | extern char *␊ |
45 | DT__GetName(Node *node);␊ |
46 | ␊ |
47 | void␊ |
48 | DT__Initialize(void);␊ |
49 | ␊ |
50 | /*␊ |
51 | * Free up memory used by in-memory representation␊ |
52 | * of device tree.␊ |
53 | */␊ |
54 | extern void␊ |
55 | DT__Finalize(void);␊ |
56 | ␊ |
57 | void␊ |
58 | DT__FlattenDeviceTree(void **result, uint32_t *length);␊ |
59 | ␊ |
60 | ␊ |
61 | #endif /* __DEVICE_TREE_H */␊ |
62 |