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/OneWireMaster.h
- Revision:
- 47:307dc45952db
- Parent:
- 43:23017dcd2ec3
- Child:
- 48:6f9208ae280e
--- a/OneWire_Masters/OneWireMaster.h Wed Apr 06 10:06:06 2016 -0500
+++ b/OneWire_Masters/OneWireMaster.h Thu Apr 07 10:26:26 2016 -0500
@@ -106,7 +106,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
virtual CmdResult OWInitMaster(void) = 0;
@@ -121,7 +120,8 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
+ * @returns OperationFailure if reset was performed but no
+ * presence pulse was detected.
**************************************************************/
virtual CmdResult OWReset(void) = 0;
@@ -140,7 +140,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
virtual CmdResult OWTouchBit(std::uint8_t & sendrecvbit, OWLevel after_level) = 0;
@@ -158,7 +157,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
virtual CmdResult OWWriteByte(std::uint8_t sendbyte, OWLevel after_level) = 0;
@@ -173,7 +171,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
virtual CmdResult OWReadByte(std::uint8_t & recvbyte, OWLevel after_level) = 0;
@@ -190,7 +187,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
virtual CmdResult OWWriteBlock(const std::uint8_t *tran_buf, std::uint8_t tran_len) = 0;
@@ -206,8 +202,7 @@
* @param[in] recv_len - number of bytes to read
*
* On Exit:
- *
- * @return CmdResult - zero on success, non-zero on failure
+ *
**************************************************************/
virtual CmdResult OWReadBlock(std::uint8_t *rx_buf, std::uint8_t rx_len) = 0;
@@ -224,7 +219,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
virtual CmdResult OWSetSpeed(OWSpeed new_speed) = 0;
@@ -244,13 +238,25 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
virtual CmdResult OWSetLevel(OWLevel new_level) = 0;
-
-
+ /**********************************************************//**
+ * @brief OWTriplet()
+ *
+ * @details Perform one bit of a 1-Wire search. This command
+ * does two read bits and one write bit. The write bit is either
+ * the default direction (all device have same bit) or in case
+ * of a discrepancy, the 'search_direction' parameter is used.
+ *
+ * @param[in,out] search_direction
+ * Input with desired direction in case both read bits are zero.
+ * Output with direction taken based on read bits.
+ *
+ * @param[out] sbr Bit result of first read operation.
+ * @param[out] tsb Bit result of second read operation.
+ **************************************************************/
virtual CmdResult OWTriplet(SearchDirection & search_direction, std::uint8_t & sbr, std::uint8_t & tsb);
@@ -276,7 +282,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWFirst(SearchState & searchState);
@@ -290,7 +295,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWNext(SearchState & searchState);
@@ -305,7 +309,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWVerify(const RomId & romId);
@@ -321,7 +324,6 @@
*
* On Exit:
*
- * @return
**************************************************************/
void OWTargetSetup(SearchState & searchState);
@@ -336,7 +338,6 @@
*
* On Exit:
*
- * @return
**************************************************************/
void OWFamilySkipSetup(SearchState & searchState);
@@ -352,7 +353,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWReadROM(RomId & romId);
@@ -366,7 +366,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWSkipROM(void);
@@ -381,7 +380,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWMatchROM(const RomId & romId);
@@ -396,7 +394,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWOverdriveSkipROM(void);
@@ -411,7 +408,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWOverdriveMatchROM(const RomId & romId);
@@ -429,7 +425,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWResume(void);
@@ -451,7 +446,6 @@
*
* On Exit:
*
- * @return CmdResult - zero on success, non-zero on failure
**************************************************************/
CmdResult OWSearch(SearchState & searchState);
};
@@ -460,4 +454,4 @@
-#endif /*ONEWIREMASTER_H*/
\ No newline at end of file
+#endif /*ONEWIREMASTER_H*/