Renamed OneWire library to OneWireSTM and also modified so it doesnt crash Maple or Maple mini boards
This commit is contained in:
parent
5dcfa4f1b0
commit
54ceae68ce
|
@ -114,12 +114,12 @@ sample code bearing this copyright.
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "OneWire.h"
|
#include "OneWireSTM.h"
|
||||||
|
|
||||||
|
|
||||||
OneWire::OneWire(uint8_t pin)
|
OneWire::OneWire(uint8_t pin)
|
||||||
{
|
{
|
||||||
pinMode(pin, INPUT);
|
//pinMode(pin, INPUT);
|
||||||
bitmask = PIN_TO_BITMASK(pin);
|
bitmask = PIN_TO_BITMASK(pin);
|
||||||
baseReg = PIN_TO_BASEREG(pin);
|
baseReg = PIN_TO_BASEREG(pin);
|
||||||
#if ONEWIRE_SEARCH
|
#if ONEWIRE_SEARCH
|
||||||
|
@ -347,6 +347,7 @@ uint8_t OneWire::search(uint8_t *newAddr)
|
||||||
|
|
||||||
unsigned char rom_byte_mask, search_direction;
|
unsigned char rom_byte_mask, search_direction;
|
||||||
|
|
||||||
|
pinMode(bitmask, INPUT);
|
||||||
// initialize for search
|
// initialize for search
|
||||||
id_bit_number = 1;
|
id_bit_number = 1;
|
||||||
last_zero = 0;
|
last_zero = 0;
|
|
@ -1,4 +1,4 @@
|
||||||
#include <OneWire.h>
|
#include <OneWireSTM.h>
|
||||||
|
|
||||||
// OneWire DS18S20, DS18B20, DS1822 Temperature Example
|
// OneWire DS18S20, DS18B20, DS1822 Temperature Example
|
||||||
//
|
//
|
|
@ -1,4 +1,4 @@
|
||||||
#include <OneWire.h>
|
#include <OneWireSTM.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DS2408 8-Channel Addressable Switch
|
* DS2408 8-Channel Addressable Switch
|
|
@ -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
|
OneWire ds(6); // OneWire bus on digital pin 6
|
||||||
void setup() {
|
void setup() {
|
||||||
Serial.begin (9600);
|
Serial.begin (9600);
|
|
@ -6,7 +6,7 @@
|
||||||
# Datatypes (KEYWORD1)
|
# Datatypes (KEYWORD1)
|
||||||
#######################################
|
#######################################
|
||||||
|
|
||||||
OneWire KEYWORD1
|
OneWireSTM KEYWORD1
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# Methods and Functions (KEYWORD2)
|
# Methods and Functions (KEYWORD2)
|
Loading…
Reference in New Issue