KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dev_nanob.h
Go to the documentation of this file.
1 /*
2  * KM3NeT CLB v2 Firmware
3  * ----------------------
4  *
5  * Copyright 2013 KM3NeT Collaboration
6  *
7  * All Rights Reserved.
8  *
9  *
10  * File : dev_nanob.h
11  * Created : 19 mei 2014
12  * Author : Vincent van Beveren
13  */
14 
15 #ifndef DEV_NANOB_H_
16 #define DEV_NANOB_H_
17 
18 #include "dev_defs.h"
19 
20 
21 /**
22  * @file
23  *
24  * @ingroup devices
25  *
26  * This provides a device mapping for a wishbone bus mapped Nano Beacon.
27  */
28 
29 
30 #define NANOB_ENABLE_CORE BIT(0)
31 #define NANOB_ENABLE_STEP_UP BIT(1)
32 
33 /**
34  * The definition of the state-machine registers.
35  */
36 typedef struct {
37  reg_o ENABLE; ///< Enable register
38  reg_io DELAY; ///< Delay after timeslice start in steps of 16ns
39  reg_io WIDTH; ///< Width of nano-beacon pulse in steps of 16ns
40  reg_io PERIOD; ///< Period of nano-beacon in steps of 16ns
41  reg_io COUNT; ///< Number of pulses per second.
42 } NANOB_Device;
43 
44 #endif /* DEV_NANOB_H_ */
volatile unsigned int PERIOD
Period of nano-beacon in steps of 16ns.
Definition: dev_nanob.h:40
volatile unsigned int ENABLE
Enable register.
Definition: dev_nanob.h:37
The definition of the state-machine registers.
Definition: dev_nanob.h:36
volatile unsigned int COUNT
Number of pulses per second.
Definition: dev_nanob.h:41
#define reg_o
Write-only register.
Definition: dev_defs.h:36
volatile unsigned int DELAY
Delay after timeslice start in steps of 16ns.
Definition: dev_nanob.h:38
volatile unsigned int WIDTH
Width of nano-beacon pulse in steps of 16ns.
Definition: dev_nanob.h:39
#define reg_io
Input/Output register.
Definition: dev_defs.h:33
This module contains some very basic type definitions used for hardware mappings. ...