-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcommon_types.h
37 lines (25 loc) · 1.11 KB
/
common_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef LIBMEMS_COMMON_TYPES_H_
#define LIBMEMS_COMMON_TYPES_H_
#include <vector>
namespace libmems {
constexpr int kErrorBufferSize = 256;
constexpr int kReadAttrBufferSize = 256;
constexpr char kDeviceIdPrefix[] = "iio:device";
constexpr char kIioSysfsTrigger[] = "iio_sysfs_trigger";
constexpr char kTriggerIdPrefix[] = "trigger";
// The attribute name to get the device name with
// IioDevice::ReadStringAttribute.
constexpr char kDeviceName[] = "name";
constexpr char kFrequencyAttr[] = "frequency";
constexpr char kSamplingFrequencyAttr[] = "sampling_frequency";
constexpr char kHWFifoTimeoutAttr[] = "buffer/hwfifo_timeout";
constexpr char kSamplingFrequencyAvailable[] = "sampling_frequency_available";
constexpr double kFrequencyEpsilon = 0.001; // Hz
constexpr char kRawAttr[] = "raw";
constexpr char kTimestampAttr[] = "timestamp";
constexpr char kSysDevString[] = "/sys/bus/iio/devices";
} // namespace libmems
#endif // LIBMEMS_COMMON_TYPES_H_