BlackDef.h
Go to the documentation of this file.
1  /*
2 
3  ####################################################################################
4  # BlackLib Library controls Beaglebone Black's inputs and outputs. #
5  # Copyright (C) 2013-2015 by Yigit YUCE #
6  ####################################################################################
7  # #
8  # This file is part of BlackLib library. #
9  # #
10  # BlackLib library is free software: you can redistribute it and/or modify #
11  # it under the terms of the GNU Lesser General Public License as published by #
12  # the Free Software Foundation, either version 3 of the License, or #
13  # (at your option) any later version. #
14  # #
15  # BlackLib library is distributed in the hope that it will be useful, #
16  # but WITHOUT ANY WARRANTY; without even the implied warranty of #
17  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
18  # GNU Lesser General Public License for more details. #
19  # #
20  # You should have received a copy of the GNU Lesser General Public License #
21  # along with this program. If not, see <http://www.gnu.org/licenses/>. #
22  # #
23  # For any comment or suggestion please contact the creator of BlackLib Library #
24  # at ygtyce@gmail.com #
25  # #
26  ####################################################################################
27 
28  */
29 
30 
31 
32 #ifndef BLACKDEF_H_
33 #define BLACKDEF_H_
34 
35 
36 #include <string>
37 
38 namespace BlackLib
39 {
40 
44  enum direction { input = 1,
45  output = 2,
47  };
48 
49 
53  enum runValue { stop = 0,
54  run = 1
55  };
56 
57 
61  enum timeType { picosecond = -12,
62  nanosecond = -9,
64  milisecond = -3,
65  second = 1
66  };
67 
68 
72  enum openMode { ReadOnly = 0,
73  WriteOnly = 1,
74  ReadWrite = 2,
75  Append = 4,
76  Truncate = 8,
77  NonBlock = 16
78  };
79 
80 
81 
82 
83 
84  const std::string DEFAULT_CAPE_MGR_NUMBER = "8";
85  const std::string DEFAULT_OCP_NUMBER = "2";
86  const std::string DEFAULT_HELPER_NUMBER = "14";
87  const std::string DEFAULT_PWM_TEST_NUMBER = "15";
88  const std::string DEFAULT_SPI0_PINMUX = "48030000";
89  const std::string DEFAULT_SPI1_PINMUX = "481a0000";
90  const unsigned int DEFAULT_OPEN_MODE = (ReadWrite);
91  const std::string PWM_TEST_NAME_NOT_FOUND = "PwmTestNameError";
92  const std::string GPIO_PIN_NOT_READY_STRING = "Gpio Pin Isn\'t Ready";
93  const int GPIO_PIN_NOT_READY_INT = -2;
94  const std::string UART_READ_FAILED = "UartReadError";
95  const std::string UART_WRITE_FAILED = "UartWriteError";
96  const std::string SEARCH_DIR_NOT_FOUND = "Not Found";
97  const std::string FILE_COULD_NOT_OPEN_STRING = "File Couldn\'t Open";
98  const int FILE_COULD_NOT_OPEN_INT = -1;
99  const float FILE_COULD_NOT_OPEN_FLOAT = -1.0;
100 
101 } /* namespace BlackLib */
102 
103 #endif /* BLACKDEF_H_ */
Definition: BlackDef.h:53
runValue
Definition: BlackDef.h:53
Definition: BlackDef.h:76
const std::string UART_WRITE_FAILED
If uart write is failed, function returns this string.
Definition: BlackDef.h:95
Definition: BlackDef.h:45
Definition: BlackDef.h:62
const std::string FILE_COULD_NOT_OPEN_STRING
If file could not open, function returns this string.
Definition: BlackDef.h:97
Definition: BlackDef.h:64
const int FILE_COULD_NOT_OPEN_INT
If file could not open, function returns this integer.
Definition: BlackDef.h:98
const std::string DEFAULT_PWM_TEST_NUMBER
If pwm_test finding fails, it uses this number.
Definition: BlackDef.h:87
const std::string DEFAULT_SPI1_PINMUX
SPI1 pinmux number.
Definition: BlackDef.h:89
Definition: BlackDef.h:65
openMode
Definition: BlackDef.h:72
Definition: BlackDef.h:63
Definition: BlackDef.h:61
const std::string SEARCH_DIR_NOT_FOUND
If directory searching fails, function returns this string.
Definition: BlackDef.h:96
const std::string DEFAULT_OCP_NUMBER
If ocp finding fails, it uses this number.
Definition: BlackDef.h:85
const std::string DEFAULT_CAPE_MGR_NUMBER
If capemgr finding fails, it uses this number.
Definition: BlackDef.h:84
const float FILE_COULD_NOT_OPEN_FLOAT
If file could not open, function returns this float value.
Definition: BlackDef.h:99
Definition: BlackDef.h:73
Definition: BlackDef.h:74
direction
Definition: BlackDef.h:44
Definition: BlackDef.h:72
const std::string GPIO_PIN_NOT_READY_STRING
If gpio pin is not ready, function returns this string.
Definition: BlackDef.h:92
Definition: BlackDef.h:46
const int GPIO_PIN_NOT_READY_INT
If gpio pin is not ready, function returns this integer.
Definition: BlackDef.h:93
const std::string PWM_TEST_NAME_NOT_FOUND
If pwm test name could not find, function returns this string.
Definition: BlackDef.h:91
Definition: BlackDef.h:77
Definition: BlackDef.h:44
const std::string DEFAULT_SPI0_PINMUX
SPI0 pinmux number.
Definition: BlackDef.h:88
const std::string DEFAULT_HELPER_NUMBER
If helper finding fails, it uses this number.
Definition: BlackDef.h:86
Definition: BlackADC.cpp:36
const std::string UART_READ_FAILED
If uart read is failed, function returns this string.
Definition: BlackDef.h:94
const unsigned int DEFAULT_OPEN_MODE
Default open mode.
Definition: BlackDef.h:90
Definition: BlackDef.h:54
timeType
Definition: BlackDef.h:61
Definition: BlackDef.h:75