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:
- 15:f6cb0d906fb6
- Parent:
- 14:7b2886a50321
- Child:
- 17:b646b1e3970b
--- a/OneWire_Masters/GPIO/owgpio.h Tue Mar 15 01:38:17 2016 +0000
+++ b/OneWire_Masters/GPIO/owgpio.h Wed Mar 16 01:19:45 2016 +0000
@@ -52,10 +52,10 @@
#include "mbed.h"
#include "OneWireInterface.h"
-#include "OneWireMastersShared.h"
+#include "OneWireMaster.h"
-class OwGpio: public OneWireInterface
+class OwGpio: public OneWireMaster
{
public:
@@ -123,52 +123,20 @@
virtual ~OwGpio();
- /***** OW API ****************************************************/
+ //Part of OneWireInterface that should be implemented for each master
+ //See OneWireInterface.h for documentation
+
virtual bool OWInitMaster();
virtual bool OWReset();
- virtual void OWWriteBit(uint8_t sendbit);
-
- virtual uint8_t OWReadBit();
-
virtual uint8_t OWTouchBit(uint8_t sendbit);
virtual bool OWWriteByte(uint8_t sendbyte);
virtual uint8_t OWReadByte(void);
-
- 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);
-
- virtual bool OWNext(void);
-
- virtual bool OWVerify(void);
-
- virtual void OWTargetSetup(uint8_t family_code);
-
- 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(OW_SPEED new_speed);
@@ -177,8 +145,6 @@
virtual bool OWWriteBytePower(uint8_t sendbyte);
virtual bool OWReadBitPower(uint8_t applyPowerResponse);
-
- virtual const uint8_t (&OWgetROMnumber() const)[ROMnumberLen];
private:
@@ -196,14 +162,7 @@
OW_LEVEL _ow_level;
uint32_t _ow_port;
- uint32_t _ow_pin;
-
- // Search state
- uint8_t _rom_number[ROMnumberLen];
- uint8_t _last_discrepancy;
- uint8_t _last_family_discrepancy;
- uint8_t _last_device_flag;
- uint8_t _crc8;
+ uint32_t _ow_pin;
};
#endif/* TARGET_MAX32600*/