Skip to content

Commit

Permalink
Merge pull request #6 from cparata/master
Browse files Browse the repository at this point in the history
Fix typo in some types
  • Loading branch information
cparata authored Jan 28, 2021
2 parents 502e619 + 9c435cd commit 467c0b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/vl6180x_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class VL6180X : public RangeSensor, public LightSensor
VL6180X(TwoWire *i2c, int pin) : RangeSensor(), LightSensor(), dev_i2c(i2c), gpio0(pin)
{
Device=&MyDevice;
memset((void *)Device, 0x0, sizeof(struct MyVL6180Dev_t));
memset((void *)Device, 0x0, sizeof(struct MyVL6180xDev_t));
MyDevice.I2cAddr=VL6180x_DEFAULT_DEVICE_ADDRESS;
MyDevice.Present=0;
MyDevice.Ready=0;
Expand Down Expand Up @@ -1146,7 +1146,7 @@ class VL6180X : public RangeSensor, public LightSensor
/* Digital out pin */
int gpio0;
/* Device data */
MyVL6180Dev_t MyDevice;
struct MyVL6180xDev_t MyDevice;
VL6180xDev_t Device;
};

Expand Down
4 changes: 2 additions & 2 deletions src/vl6180x_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extern volatile uint32_t g_TickCnt;
#error "VL6180x_SINGLE_DEVICE_DRIVER must be set"
#endif

struct MyVL6180Dev_t {
struct MyVL6180xDev_t {
struct VL6180xDevData_t Data;
uint8_t I2cAddr;
//uint8_t DevID;
Expand All @@ -96,7 +96,7 @@ struct MyVL6180Dev_t {
unsigned Present:1;
unsigned Ready:1;
};
typedef struct MyVL6180Dev_t *VL6180xDev_t;
typedef struct MyVL6180xDev_t *VL6180xDev_t;

#define VL6180xDevDataGet(dev, field) (dev->Data.field)
#define VL6180xDevDataSet(dev, field, data) (dev->Data.field)=(data)
Expand Down

0 comments on commit 467c0b5

Please sign in to comment.