Renamed OneWire library to OneWireSTM and also modified so it doesnt crash Maple or Maple mini boards

This commit is contained in:
Roger Clark 2015-04-09 19:50:32 +10:00
parent 5dcfa4f1b0
commit 54ceae68ce
6 changed files with 7 additions and 6 deletions

View File

@ -114,12 +114,12 @@ sample code bearing this copyright.
//--------------------------------------------------------------------------
*/
#include "OneWire.h"
#include "OneWireSTM.h"
OneWire::OneWire(uint8_t pin)
{
pinMode(pin, INPUT);
//pinMode(pin, INPUT);
bitmask = PIN_TO_BITMASK(pin);
baseReg = PIN_TO_BASEREG(pin);
#if ONEWIRE_SEARCH
@ -347,6 +347,7 @@ uint8_t OneWire::search(uint8_t *newAddr)
unsigned char rom_byte_mask, search_direction;
pinMode(bitmask, INPUT);
// initialize for search
id_bit_number = 1;
last_zero = 0;

View File

@ -1,4 +1,4 @@
#include <OneWire.h>
#include <OneWireSTM.h>
// OneWire DS18S20, DS18B20, DS1822 Temperature Example
//

View File

@ -1,4 +1,4 @@
#include <OneWire.h>
#include <OneWireSTM.h>
/*
* DS2408 8-Channel Addressable Switch

View File

@ -22,7 +22,7 @@ DS250x add-only programmable memory reader w/SKIP ROM.
*/
#include <OneWire.h>
#include <OneWireSTM.h>
OneWire ds(6); // OneWire bus on digital pin 6
void setup() {
Serial.begin (9600);

View File

@ -6,7 +6,7 @@
# Datatypes (KEYWORD1)
#######################################
OneWire KEYWORD1
OneWireSTM KEYWORD1
#######################################
# Methods and Functions (KEYWORD2)