Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

Commit

Permalink
Text cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
K.Townsend committed Sep 20, 2012
1 parent c54030a commit 8b7e7c6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions Adafruit_L3GD20.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,15 @@ bool Adafruit_L3GD20::init(l3gd20Range_t rng, byte addr)
11 = 2000 dps
0 SIM SPI Mode (0=4-wire, 1=3-wire) 0 */

/* Adjust resolution if requested */
switch(range)
{
case L3DS20_RANGE_500DPS:
case L3DS20_RANGE_500DPS:
write8(L3GD20_REGISTER_CTRL_REG4, 0x10);
break;
case L3DS20_RANGE_2000DPS:
break;
case L3DS20_RANGE_2000DPS:
write8(L3GD20_REGISTER_CTRL_REG4, 0x20);
break;
break;
}
/* ------------------------------------------------------------------ */

Expand Down
16 changes: 8 additions & 8 deletions Adafruit_L3GD20.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ class Adafruit_L3GD20
L3GD20_REGISTER_TSH_ZL = 0x37, // 00000000 rw
L3GD20_REGISTER_INT1_DURATION = 0x38 // 00000000 rw
} l3gd20Registers_t;
typedef enum
{
L3DS20_RANGE_250DPS,
L3DS20_RANGE_500DPS,
L3DS20_RANGE_2000DPS
} l3gd20Range_t;

typedef enum
{
L3DS20_RANGE_250DPS,
L3DS20_RANGE_500DPS,
L3DS20_RANGE_2000DPS
} l3gd20Range_t;

typedef struct l3gd20Data_s
{
Expand All @@ -83,7 +83,7 @@ class Adafruit_L3GD20
void write8(l3gd20Registers_t reg, byte value);
byte read8(l3gd20Registers_t reg);
byte address;
l3gd20Range_t range;
l3gd20Range_t range;
};

#endif

0 comments on commit 8b7e7c6

Please sign in to comment.