VitroIO SDK
Software development kit for Vitro Shard.
Loading...
Searching...
No Matches
shard_edge.h
Go to the documentation of this file.
1#ifndef SHARD_EDGE_H
2#define SHARD_EDGE_H
3
4#include <mbed.h>
5#include <vitroio-sdk/debug.h>
7
8namespace vitroio
9{
10
11namespace sdk
12{
13
14class ShardEdge {
15public:
16
34 ShardEdge(bool i2c3Enabled, bool uartUserEnabled, bool spi1Enabled,
35 bool rs232Enabled, uint8_t adc1_range, uint8_t adc2_range,
36 uint8_t adc3_range, uint8_t adc4_range);
37
46
55 double readVoltage(int adc_port);
56
64 double readCurrentLoop(int cl_port);
65
66
67
68
69
78 int manageShardEdge24V(bool state);
79
80private:
88 int readCarrierBoardRev(char *carrierBoardRevision);
89
100 uint8_t configureAdcRange(uint8_t adcRange);
101
102 bool i2c3Enabled_;
103 bool uartUserEnabled_;
104 bool spi1Enabled_;
105 bool rs232Enabled_;
106 uint8_t adcRange[4];
107 AnalogIn *adcPins[4];
108 AnalogIn *clPins[4];
109};
110
111} // namespace sdk
112
113} // namespace vitroio
114#endif // SHARD_EDGE_H
Definition: shard_edge.h:14
ShardEdge(bool i2c3Enabled, bool uartUserEnabled, bool spi1Enabled, bool rs232Enabled, uint8_t adc1_range, uint8_t adc2_range, uint8_t adc3_range, uint8_t adc4_range)
Function creates instance of ShardEdge class and set private variables to given input values.
int manageShardEdge24V(bool state)
Function manage Shard Edge 24V output.
double readVoltage(int adc_port)
Function reads voltage from given ADC port.
int configureShardEdge(void)
Function configures Shard Edge according to variables set during instance creation.
double readCurrentLoop(int cl_port)
Function reads current loop value from given CL.
The file contains constants of vitro-shard-sdk for user usage.
The file defines debug macros.
The namespace contains all of components of vitro-shard-sdk and components based on the sdk....
Definition: can_layer.h:9