Pleora Technologies Inc. eBUS SDK v6.2.8.5877 API



PvDeviceI2CBus.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2009, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVDEVICEI2CBUS_H__
8 #define __PVDEVICEI2CBUS_H__
9 
10 #include <PvDeviceSerialPort.h>
11 
12 
13 namespace PvSerialLib
14 {
15  class DeviceI2CBus;
16 }
17 
18 
19 class PV_SERIAL_API PvDeviceI2CBus
20 {
21 public:
22 
24  ~PvDeviceI2CBus();
25 
26  PvResult Open( IPvDeviceAdapter *aDevice,
28 
29  PvResult Close();
30 
31  bool IsOpened();
32 
33  static bool IsSupported( IPvDeviceAdapter *aDevice,
35 
36  PvResult BurstWrite(
37  unsigned char aSlaveAddress,
38  const unsigned char *aBuffer,
39  uint32_t aBufferSize,
40  bool aFastMode = true );
41 
42  PvResult IndirectBurstWrite(
43  unsigned char aSlaveAddress,
44  unsigned char aOffset,
45  const unsigned char *aBuffer,
46  uint32_t aBufferSize,
47  bool aFastMode = true );
48 
49  PvResult BurstRead(
50  unsigned char aSlaveAddress,
51  unsigned char *aBuffer,
52  uint32_t aBufferSize,
53  uint32_t &aBytesRead,
54  bool aFastMode = true );
55 
56  PvResult IndirectBurstRead(
57  unsigned char aSlaveAddress,
58  unsigned char aOffset,
59  unsigned char *aBuffer,
60  uint32_t aBufferSize,
61  uint32_t &aBytesRead,
62  bool aFastMode = true,
63  bool aUseCombinedFormat = true );
64 
65  PvResult MasterTransmitter(
66  uint8_t aSlaveAddress,
67  const uint8_t *aBuffer,
68  uint32_t aBufferSize,
69  bool aFastMode = true,
70  bool aGenerateStopCondition = true );
71 
72  PvResult MasterReceiverAfterFirstByte(
73  uint8_t aSlaveAddress,
74  uint8_t *aBuffer,
75  uint32_t aBufferSize,
76  uint32_t &aBytesRead,
77  bool aFastMode = true,
78  bool aGenerateStopCondition = true );
79 
80 private:
81 
82  PvSerialLib::DeviceI2CBus* mThis;
83 
84 };
85 
86 #endif
PvResult
Result information.
Definition: PvResult.h:13
IPvDeviceAdapter
Interface used by PvDeviceSerialPort to interact with a device controller.
Definition: IPvDeviceAdapter.h:31
PvDeviceI2CBus
I2C serial controller.
Definition: PvDeviceI2CBus.h:19
PvDeviceSerial
PvDeviceSerial
Device serial port enumeration.
Definition: PvDeviceSerialEnums.h:11
PvDeviceSerialBulk0
@ PvDeviceSerialBulk0
Definition: PvDeviceSerialEnums.h:16

Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com