Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Max32630_One_Wire_Interface
Diff: OneWire_Masters/GPIO/owgpio.h
- Revision:
- 5:ce108eeb878d
- Parent:
- 3:644fc630f958
- Child:
- 9:641516a3f0dc
--- a/OneWire_Masters/GPIO/owgpio.h Tue Feb 02 21:34:27 2016 +0000
+++ b/OneWire_Masters/GPIO/owgpio.h Tue Feb 09 03:30:22 2016 +0000
@@ -49,6 +49,7 @@
#include "mbed.h"
#include "OneWireInterface.h"
+#include "OneWireMastersShared.h"
class OwGpio: public OneWireInterface
@@ -65,33 +66,7 @@
* On Exit:
* @return
**************************************************************/
- OwGpio(PinName ow_gpio);
-
-
- /**********************************************************//**
- * @brief
- *
- * @details
- *
- * On Entry:
- *
- * On Exit:
- * @return
- **************************************************************/
- OwGpio(PinName ow_gpio, PinName ext_spu);
-
-
- /**********************************************************//**
- * @brief
- *
- * @details
- *
- * On Entry:
- *
- * On Exit:
- * @return
- **************************************************************/
- ~OwGpio();
+ OwGpio(PinName ow_gpio, PinName ext_spu = NC);
/***** OW API ****************************************************/
@@ -110,6 +85,10 @@
virtual uint8_t OWTouchByte(uint8_t sendbyte);
virtual void OWBlock(uint8_t *tran_buf, uint8_t tran_len);
+
+ virtual void OWWriteBlock(const uint8_t *tran_buf, uint8_t tran_len);
+
+ virtual void OWReadBlock(uint8_t *recv_buf, uint8_t recv_len);
virtual bool OWFirst(void);
@@ -122,23 +101,35 @@
virtual void OWFamilySkipSetup(void);
virtual bool OWSearch(void);
+
+ virtual bool OWReadROM(void);
+
+ virtual bool OWSkipROM(void);
+
+ virtual bool OWMatchROM(void);
+
+ virtual bool OWOverdriveSkipROM(void);
+
+ virtual bool OWOverdriveMatchROM(void);
+
+ virtual bool OWResume(void);
- virtual uint8_t OWSpeed(uint8_t new_speed);
+ virtual uint8_t OWSpeed(OW_SPEED new_speed);
- virtual uint8_t OWLevel(uint8_t new_level);
+ virtual uint8_t OWLevel(OW_LEVEL new_level);
virtual bool OWWriteBytePower(uint8_t sendbyte);
virtual bool OWReadBitPower(uint8_t applyPowerResponse);
- virtual uint8_t OWCalc_crc8(uint8_t data);
-
- virtual void OWgetROMnumber(uint8_t *p_rom_buff);
+ virtual const uint8_t (&OWgetROMnumber() const)[ROMnumberLen];
private:
- DigitalInOut *_ow_gpio;
- DigitalOut *_ext_spu;
+ DigitalInOut _ow_gpio;
+ DigitalOut _ext_spu;
+
+ uint8_t _rom_number[ROMnumberLen];
};
#endif /*OWGPIO_H*/