KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
power.h File Reference

This module provides access to the peripherals on the power board. More...

#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Macros

#define POWER_OVERFLOW   0x7FFFFFFF
 
#define POWER_UNDERFLOW   0x80000000
 
#define POWER_12V_CUR   0
 
#define POWER_1V_CUR   1
 
#define POWER_1V8_CUR   2
 
#define POWER_2V5_CUR   3
 
#define POWER_3V3_CUR   4
 
#define POWER_5V_CUR   5
 
#define POWER_3V3PMT_CUR   6
 
#define POWER_VLED_CUR   7
 
#define POWER_VLED_LVL   8
 
#define POWER_12V_LVL   9
 
#define POWER_TEMP_LVL   10
 
#define POWER_1V_LVL   11
 
#define POWER_1V8_LVL   12
 
#define POWER_2V5_LVL   13
 
#define POWER_3V3_LVL   14
 
#define POWER_5V_LVL   15
 
#define POWER_3V3PMT_LVL   16
 
#define POWER_DACCTL_LVL   17
 
#define POWER_COUNT   18
 
#define POWER_VLED_MAX_MV   30026
 Maximum power which can be supplied to the LED. More...
 

Functions

bool pwrInit ()
 Initializes the powerboard. More...
 
bool pwrMeasureAll (uint16_t *results)
 Initiates a conversion for the given channel. More...
 
bool pwrSetLED (uint32_t mv)
 Set the LED output in millivolts. More...
 

Detailed Description

This module provides access to the peripherals on the power board.

Definition in file power.h.

Macro Definition Documentation

#define POWER_VLED_MAX_MV   30026

Maximum power which can be supplied to the LED.

Definition at line 54 of file power.h.

Function Documentation

bool pwrInit ( )

Initializes the powerboard.

Return values
trueSuccess
falseFailure, check error module for error.

Definition at line 63 of file power.c.

bool pwrMeasureAll ( uint16_t *  results)

Initiates a conversion for the given channel.

Levels are in mV, Currents in mA and temperature in mC.

Parameters
resultsArray of 18 entries filled with each value in milli units.
Return values
trueSuccess
falseFailure, check error module for error.

Definition at line 73 of file power.c.

bool pwrSetLED ( uint32_t  mv)

Set the LED output in millivolts.

0 - POWER_VLED_MAX_MV.

Parameters
mvLED voltage
Return values
trueSuccess
falseFailure, see error module for error code and message.

Definition at line 91 of file power.c.