KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sdb.h
Go to the documentation of this file.
1 /*
2  * KM3NeT CLB v2 Firmware
3  * ----------------------
4  *
5  * Copyright 2013 National Institute for Subatomic Physics Nikhef
6  *
7  * All Rights Reserved.
8  *
9  *
10  * File : sdb.h
11  * Created : 5 jul. 2013
12  * Author : Vincent van Beveren
13  */
14 
15 
16 #ifndef SDB_H_
17 #define SDB_H_
18 
19 #include "errorcode.h"
20 #include <stdbool.h>
21 
22 /**
23  * @file
24  *
25  * @ingroup wbdrivers
26  *
27  * Implements search functionality for the self-describing bus.
28  *
29  */
30 
31 #define E_SDB_MAGIC ( E_SDB + 0x01 ) ///< Magic number incorrect
32 #define E_SDB_MAGIC_DESCR "SDB Magic Number"
33 
34 /**
35  * Initializes the self-describing bus.
36  *
37  * @retval true SDB was found
38  * @retval false SDB does not seem to be present (magic number invalid)
39  */
40 bool sdbInit();
41 
42 /**
43  * Finds a device on the bus.
44  *
45  * @param id The device ID.
46  *
47  * @return A pointer to the device, or NULL if the device was not found
48  */
49 void * sdbFindDevice(uint32_t id);
50 
51 /**
52  * Dumps the contents of the SDB records to standard out.
53  */
54 void sdbDisplay();
55 
56 #endif /* SDB_H_ */
void * sdbFindDevice(uint32_t id)
Finds a device on the bus.
Definition: sdb.c:305
bool sdbInit()
Initializes the self-describing bus.
Definition: sdb.c:310
This module is responsible for distributing error codes.
void sdbDisplay()
Dumps the contents of the SDB records to standard out.
Definition: sdb.c:323