• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テスト用のあれこれ共用フォルダ


Commit MetaInfo

Révisione83d4ad191e1a91d0410d43f5b15c51c6a5f4e69 (tree)
l'heure2018-04-27 18:56:46
Auteurtakemasa <suikan@user...>
Commitertakemasa

Message de Log

Added AbstractPeripheral to add the stub to the loggers.
Remeved unneccesary destructor from the abstract classes.

Added doxygen comment.

Change Summary

Modification

--- a/stm32_development/murasaki/murasaki/abstracti2cmaster.hpp
+++ b/stm32_development/murasaki/murasaki/abstracti2cmaster.hpp
@@ -31,13 +31,6 @@ namespace murasaki {
3131 class AbstractI2CMaster : murasaki::AbstractPeripheral
3232 {
3333 public:
34- /**
35- * \brief Destructor. Declared to enforce the derived destructor is virtual.
36- */
37- virtual ~AbstractI2CMaster()
38- {
39- }
40- ;
4134
4235 /**
4336 * @brief Thread safe, blocking transmission over I2C.
--- a/stm32_development/murasaki/murasaki/abstractlogger.hpp
+++ b/stm32_development/murasaki/murasaki/abstractlogger.hpp
@@ -69,7 +69,7 @@ class AbstractLogger
6969 virtual void DoPostMotem( void * debugger_fifo){while(true);}
7070 protected:
7171 /**
72- * \brief This special method helps derived loggers can access the raw device, in case of the
72+ * \brief This special method helps derived loggers. The loggers can access the raw device, in case of the
7373 * post motem processing.
7474 */
7575 static void * GetPeripheralHandle(murasaki::AbstractPeripheral * peripheral);
@@ -81,7 +81,8 @@ class AbstractLogger
8181 } /* namespace murasaki */
8282
8383 inline void* murasaki::AbstractLogger::GetPeripheralHandle(
84- murasaki::AbstractPeripheral* peripheral) {
84+ murasaki::AbstractPeripheral* peripheral)
85+{
8586 return(peripheral->GetPeripheralHandle());
8687 }
8788
--- /dev/null
+++ b/stm32_development/murasaki/murasaki/abstractperipheral.hpp
@@ -0,0 +1,39 @@
1+/**
2+ * @file AbstractPeripheral.hpp
3+ *
4+ * @date 2018/04/26
5+ * @author: takemasa
6+ * @brief Mother of All peripheral
7+ */
8+
9+#ifndef ABSTRACTPERIPHERAL_HPP_
10+#define ABSTRACTPERIPHERAL_HPP_
11+
12+namespace murasaki {
13+
14+/**
15+ * \ingroup MURASAKI_ABSTRACT_GROUP
16+ * @brief Mother of all peripheral class
17+ * @details
18+ * This class provides a common stub for the debugging logger. The loggers sometimes refers the
19+ * raw peripheral to respond to the post motem situaiton. By using class, programmer can pass the
20+ * raw pheripheral handler to loggers, while keep it hidden from the application.
21+ */
22+class AbstractPeripheral {
23+public:
24+ /**
25+ * @brief destructor
26+ */
27+ virtual ~AbstractPeripheral(){};
28+private:
29+ /**
30+ * @brief pass the raw peripheral handler
31+ * @return pointer to the raw peripheral handler hidden in a class.
32+ */
33+ virtual void * GetPeripheralHandle()=0;
34+friend class AbstractLogger;
35+};
36+
37+} /* namespace murasaki */
38+
39+#endif /* ABSTRACTPERIPHERAL_HPP_ */
--- a/stm32_development/murasaki/murasaki/abstractspimaster.hpp
+++ b/stm32_development/murasaki/murasaki/abstractspimaster.hpp
@@ -25,13 +25,6 @@ class AbstractSpiMaster:public murasaki::AbstractPeripheral
2525 {
2626 public:
2727 /**
28- * @brief Destructor
29- */
30- virtual ~AbstractSpiMaster()
31- {
32- }
33- ;
34- /**
3528 * @brief Thread safe, blocking SPI transfer
3629 * @param spi_spec Pointer to the SPI slave specifier which has clock configuraiton and chip select handling.
3730 * @param tx_data Data to be transmitted
--- a/stm32_development/murasaki/murasaki/abstractuart.hpp
+++ b/stm32_development/murasaki/murasaki/abstractuart.hpp
@@ -40,11 +40,6 @@ namespace murasaki {
4040 class AbstractUart : public murasaki::AbstractPeripheral {
4141 public:
4242
43- /** \brief Destructor. Defined to have a virtual place holder. */
44- virtual ~AbstractUart()
45- {
46- }
47- ;
4843 /**
4944 * \brief Set the behavior of the hardware flow control
5045 * \param control The control mode.