Skip to content

Commit

Permalink
Changed 1 to 0x1 to ensure bitfields are correct in DS248x commands
Browse files Browse the repository at this point in the history
  • Loading branch information
elcojacobs committed Jul 31, 2015
1 parent b794a28 commit ac6d80f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions platform/spark/modules/OneWire/DS248x.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
#include "application.h"
#include "OneWireLowLevelInterface.h"

#define DS248X_CONFIG_APU (1<<0)
#define DS248X_CONFIG_PPM (1<<1)
#define DS248X_CONFIG_SPU (1<<2)
#define DS2484_CONFIG_WS (1<<3)

#define DS248X_STATUS_BUSY (1<<0)
#define DS248X_STATUS_PPD (1<<1)
#define DS248X_STATUS_SD (1<<2)
#define DS248X_STATUS_LL (1<<3)
#define DS248X_STATUS_RST (1<<4)
#define DS248X_STATUS_SBR (1<<5)
#define DS248X_STATUS_TSB (1<<6)
#define DS248X_STATUS_DIR (1<<7)
#define DS248X_CONFIG_APU (0x1<<0)
#define DS248X_CONFIG_PPM (0x1<<1)
#define DS248X_CONFIG_SPU (0x1<<2)
#define DS2484_CONFIG_WS (0x1<<3)

#define DS248X_STATUS_BUSY (0x1<<0)
#define DS248X_STATUS_PPD (0x1<<1)
#define DS248X_STATUS_SD (0x1<<2)
#define DS248X_STATUS_LL (0x1<<3)
#define DS248X_STATUS_RST (0x1<<4)
#define DS248X_STATUS_SBR (0x1<<5)
#define DS248X_STATUS_TSB (0x1<<6)
#define DS248X_STATUS_DIR (0x1<<7)

// I2C commands
#define DS248X_DRST 0xf0 // Device Reset
Expand Down Expand Up @@ -114,4 +114,4 @@ class DS248x /*: public OneWireLowLevelInterface */ {
void setReadPtr(uint8_t readPtr);

uint8_t busyWait(bool setReadPtr = false); //blocks until
};
};

0 comments on commit ac6d80f

Please sign in to comment.