テスト用のあれこれ共用フォルダ
Revisión | f0f6e4db2a7270740189755e9e13d7393730036a (tree) |
---|---|
Tiempo | 2019-02-05 08:31:05 |
Autor | takemasa <suikan@user...> |
Commiter | takemasa |
Refactored class name.
@@ -6,7 +6,7 @@ | ||
6 | 6 | <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> |
7 | 7 | <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> |
8 | 8 | <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> |
9 | - <provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1429691010231092235" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> | |
9 | + <provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1318604374853316739" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> | |
10 | 10 | <language-scope id="org.eclipse.cdt.core.gcc"/> |
11 | 11 | <language-scope id="org.eclipse.cdt.core.g++"/> |
12 | 12 | </provider> |
@@ -18,7 +18,7 @@ | ||
18 | 18 | <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/> |
19 | 19 | <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/> |
20 | 20 | <provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/> |
21 | - <provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-1429691010231092235" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> | |
21 | + <provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1318604374853316739" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true"> | |
22 | 22 | <language-scope id="org.eclipse.cdt.core.gcc"/> |
23 | 23 | <language-scope id="org.eclipse.cdt.core.g++"/> |
24 | 24 | </provider> |
@@ -85,7 +85,7 @@ struct Platform | ||
85 | 85 | BitOutStrategy * led; ///< GP out under test |
86 | 86 | UartStrategy * uart; ///< UART under test |
87 | 87 | SpiMasterStrategy * spiMaster; ///< SPI Master under test |
88 | - AbstractSpiSlave * spiSlave; ///< SPI Slave under test | |
88 | + SpiSlaveStrategy * spiSlave; ///< SPI Slave under test | |
89 | 89 | I2CMasterStrategy * i2cMaster; ///< I2C Master under test |
90 | 90 | I2cSlaveStrategy * i2cSlave; ///< I2C Slave under test |
91 | 91 |
@@ -12,8 +12,8 @@ | ||
12 | 12 | <targetDefinitions> |
13 | 13 | <board id="nucleo-f746zg"> |
14 | 14 | <name>NUCLEO-F746ZG</name> |
15 | - <dbgIF>JTAG</dbgIF> | |
16 | 15 | <dbgIF>SWD</dbgIF> |
16 | + <dbgIF>JTAG</dbgIF> | |
17 | 17 | <dbgDEV>ST-Link</dbgDEV> |
18 | 18 | <mcuId>stm32f746zgtx</mcuId> |
19 | 19 | </board> |
@@ -152,7 +152,7 @@ void ExecPlatform() | ||
152 | 152 | |
153 | 153 | { |
154 | 154 | // Create a slave specifier. This object specify the protocol and slave select pin |
155 | - murasaki::AbstractSpiSlaveSpecifier * slave_spec; | |
155 | + murasaki::SpiSlaveSpecifierStrategy * slave_spec; | |
156 | 156 | slave_spec = new murasaki::SpiSlaveSpecifier( |
157 | 157 | murasaki::kspoFallThenRise, |
158 | 158 | murasaki::ksphLatchThenShift, |
@@ -47,7 +47,7 @@ class Debugger | ||
47 | 47 | public: |
48 | 48 | /** |
49 | 49 | * \brief Constructor. Create internal variable. |
50 | - * \param logger The pointer to the \ref AbstractLogger wrapper class variable. | |
50 | + * \param logger The pointer to the \ref LoggerStrategy wrapper class variable. | |
51 | 51 | */ |
52 | 52 | Debugger(LoggerStrategy* logger); |
53 | 53 | /** |
@@ -125,7 +125,7 @@ enum WaitMilliSeconds | ||
125 | 125 | /** |
126 | 126 | * \brief Attribute of the UART Hardware Flow Control. |
127 | 127 | * \details |
128 | - * This is dedicated to the \ref AbstractUart class. | |
128 | + * This is dedicated to the \ref UartStrategy class. | |
129 | 129 | */ |
130 | 130 | enum UartHardwareFlowControl |
131 | 131 | { |
@@ -42,7 +42,7 @@ SpiMaster::~SpiMaster() | ||
42 | 42 | |
43 | 43 | } |
44 | 44 | |
45 | -SpiStatus SpiMaster::TransmitAndReceive(murasaki::AbstractSpiSlaveSpecifier* spi_spec, | |
45 | +SpiStatus SpiMaster::TransmitAndReceive(murasaki::SpiSlaveSpecifierStrategy* spi_spec, | |
46 | 46 | const uint8_t* tx_data, |
47 | 47 | uint8_t* rx_data, |
48 | 48 | unsigned int size, |
@@ -101,7 +101,7 @@ class SpiMaster : public SpiMasterStrategy | ||
101 | 101 | * @li Other : Unhandled error . SPI re-initialized. |
102 | 102 | */ |
103 | 103 | virtual SpiStatus TransmitAndReceive( |
104 | - murasaki::AbstractSpiSlaveSpecifier * spi_spec, | |
104 | + murasaki::SpiSlaveSpecifierStrategy * spi_spec, | |
105 | 105 | const uint8_t * tx_data, |
106 | 106 | uint8_t * rx_data, |
107 | 107 | unsigned int size, |
@@ -9,8 +9,8 @@ | ||
9 | 9 | #ifndef SPIMASTERSTRATEGY_HPP_ |
10 | 10 | #define SPIMASTERSTRATEGY_HPP_ |
11 | 11 | |
12 | -#include <abstractspislavespecifier.hpp> | |
13 | 12 | #include <peripheralstrategy.hpp> |
13 | +#include <spislavespecifierstrategy.hpp> | |
14 | 14 | |
15 | 15 | namespace murasaki { |
16 | 16 |
@@ -34,7 +34,7 @@ class SpiMasterStrategy:public murasaki::PeripheralStrategy | ||
34 | 34 | * @return true if transfer complete, false if timeout |
35 | 35 | */ |
36 | 36 | virtual SpiStatus TransmitAndReceive( |
37 | - murasaki::AbstractSpiSlaveSpecifier * spi_spec, | |
37 | + murasaki::SpiSlaveSpecifierStrategy * spi_spec, | |
38 | 38 | const uint8_t * tx_data, |
39 | 39 | uint8_t * rx_data, |
40 | 40 | unsigned int size, |
@@ -9,7 +9,7 @@ | ||
9 | 9 | #ifndef SPISLAVE_HPP_ |
10 | 10 | #define SPISLAVE_HPP_ |
11 | 11 | |
12 | -#include <abstractspislave.hpp> | |
12 | +#include <spislavestrategy.hpp> | |
13 | 13 | #include <synchronizer.hpp> |
14 | 14 | #include "criticalsection.hpp" |
15 | 15 |
@@ -63,7 +63,7 @@ namespace murasaki { | ||
63 | 63 | * any of CRC detection, TI frame mode or Multi-master SPI. |
64 | 64 | * @ingroup MURASAKI_GROUP |
65 | 65 | */ |
66 | -class SpiSlave : public AbstractSpiSlave | |
66 | +class SpiSlave : public SpiSlaveStrategy | |
67 | 67 | { |
68 | 68 | public: |
69 | 69 | /** |
@@ -17,7 +17,7 @@ SpiSlaveSpecifier::SpiSlaveSpecifier(murasaki::SpiClockPolarity pol, | ||
17 | 17 | murasaki::SpiClockPhase pha, |
18 | 18 | ::GPIO_TypeDef* port, |
19 | 19 | uint16_t pin) |
20 | - : AbstractSpiSlaveSpecifier(pol, pha), | |
20 | + : SpiSlaveSpecifierStrategy(pol, pha), | |
21 | 21 | port_(port), |
22 | 22 | pin_(pin) |
23 | 23 | { |
@@ -26,7 +26,7 @@ SpiSlaveSpecifier::SpiSlaveSpecifier(murasaki::SpiClockPolarity pol, | ||
26 | 26 | } |
27 | 27 | |
28 | 28 | SpiSlaveSpecifier::SpiSlaveSpecifier(unsigned int pol, unsigned int pha, ::GPIO_TypeDef* port, uint16_t pin) |
29 | - : AbstractSpiSlaveSpecifier(pol, pha), | |
29 | + : SpiSlaveSpecifierStrategy(pol, pha), | |
30 | 30 | port_(port), |
31 | 31 | pin_(pin) |
32 | 32 | { |
@@ -9,7 +9,7 @@ | ||
9 | 9 | #ifndef SPISLAVESPECIFIER_HPP_ |
10 | 10 | #define SPISLAVESPECIFIER_HPP_ |
11 | 11 | |
12 | -#include <abstractspislavespecifier.hpp> | |
12 | +#include <spislavespecifierstrategy.hpp> | |
13 | 13 | |
14 | 14 | // Check if CubeMx geenrates the SPI modeule |
15 | 15 | #ifdef HAL_SPI_MODULE_ENABLED |
@@ -29,7 +29,7 @@ namespace murasaki { | ||
29 | 29 | * |
30 | 30 | * @ingroup MURASAKI_GROUP |
31 | 31 | */ |
32 | -class SpiSlaveSpecifier : public AbstractSpiSlaveSpecifier | |
32 | +class SpiSlaveSpecifier : public SpiSlaveSpecifierStrategy | |
33 | 33 | { |
34 | 34 | public: |
35 | 35 | SpiSlaveSpecifier(); |
@@ -5,48 +5,48 @@ | ||
5 | 5 | * Author: takemasa |
6 | 6 | */ |
7 | 7 | |
8 | -#include <abstractspislavespecifier.hpp> | |
8 | +#include <spislavespecifierstrategy.hpp> | |
9 | 9 | #include "murasaki_assert.hpp" |
10 | 10 | |
11 | 11 | namespace murasaki { |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | -AbstractSpiSlaveSpecifier::~AbstractSpiSlaveSpecifier() | |
15 | +SpiSlaveSpecifierStrategy::~SpiSlaveSpecifierStrategy() | |
16 | 16 | { |
17 | 17 | // Do nothing. |
18 | 18 | } |
19 | 19 | |
20 | -void AbstractSpiSlaveSpecifier::AssertCs() | |
20 | +void SpiSlaveSpecifierStrategy::AssertCs() | |
21 | 21 | { |
22 | 22 | // Do nothing here |
23 | 23 | // Must be overriden |
24 | 24 | } |
25 | 25 | |
26 | -void AbstractSpiSlaveSpecifier::DeassertCs() | |
26 | +void SpiSlaveSpecifierStrategy::DeassertCs() | |
27 | 27 | { |
28 | 28 | // Do nothing here |
29 | 29 | // Must be overriden |
30 | 30 | } |
31 | 31 | |
32 | -murasaki::SpiClockPhase AbstractSpiSlaveSpecifier::GetCpha() | |
32 | +murasaki::SpiClockPhase SpiSlaveSpecifierStrategy::GetCpha() | |
33 | 33 | { |
34 | 34 | return cpha_; |
35 | 35 | } |
36 | 36 | |
37 | -murasaki::SpiClockPolarity AbstractSpiSlaveSpecifier::GetCpol() | |
37 | +murasaki::SpiClockPolarity SpiSlaveSpecifierStrategy::GetCpol() | |
38 | 38 | { |
39 | 39 | return cpol_; |
40 | 40 | } |
41 | 41 | |
42 | 42 | |
43 | -AbstractSpiSlaveSpecifier::AbstractSpiSlaveSpecifier(murasaki::SpiClockPolarity pol, murasaki::SpiClockPhase pha) | |
43 | +SpiSlaveSpecifierStrategy::SpiSlaveSpecifierStrategy(murasaki::SpiClockPolarity pol, murasaki::SpiClockPhase pha) | |
44 | 44 | : cpol_(pol), |
45 | 45 | cpha_(pha) |
46 | 46 | { |
47 | 47 | } |
48 | 48 | |
49 | -AbstractSpiSlaveSpecifier::AbstractSpiSlaveSpecifier(unsigned int pol, unsigned int pha) | |
49 | +SpiSlaveSpecifierStrategy::SpiSlaveSpecifierStrategy(unsigned int pol, unsigned int pha) | |
50 | 50 | : cpol_(static_cast<murasaki::SpiClockPolarity>(pol)), |
51 | 51 | cpha_(static_cast<murasaki::SpiClockPhase>(pha)) |
52 | 52 | { |
@@ -1,12 +1,12 @@ | ||
1 | 1 | /** |
2 | - * @file abstractspislavespecifier.hpp | |
2 | + * @file spislavespecifierstrategy.hpp | |
3 | 3 | * |
4 | 4 | * @date 2018/02/11 |
5 | 5 | * @author: takemasa |
6 | 6 | */ |
7 | 7 | |
8 | -#ifndef ABSTRACTSPISLAVESPECIFIER_HPP_ | |
9 | -#define ABSTRACTSPISLAVESPECIFIER_HPP_ | |
8 | +#ifndef SPISLAVESPECIFIERSTRATEGY_HPP_ | |
9 | +#define SPISLAVESPECIFIERSTRATEGY_HPP_ | |
10 | 10 | |
11 | 11 | #include "murasaki_defs.hpp" |
12 | 12 |
@@ -28,7 +28,7 @@ namespace murasaki { | ||
28 | 28 | * These member functions will be called from the AbstractSpiMaster. |
29 | 29 | * @ingroup MURASAKI_ABSTRACT_GROUP |
30 | 30 | */ |
31 | -class AbstractSpiSlaveSpecifier | |
31 | +class SpiSlaveSpecifierStrategy | |
32 | 32 | { |
33 | 33 | public: |
34 | 34 | /** |
@@ -36,17 +36,17 @@ class AbstractSpiSlaveSpecifier | ||
36 | 36 | * @param pol Polarity setting |
37 | 37 | * @param pha Phase setting |
38 | 38 | */ |
39 | - AbstractSpiSlaveSpecifier(murasaki::SpiClockPolarity pol, murasaki::SpiClockPhase pha); | |
39 | + SpiSlaveSpecifierStrategy(murasaki::SpiClockPolarity pol, murasaki::SpiClockPhase pha); | |
40 | 40 | /** |
41 | 41 | * @brief Constructor |
42 | 42 | * @param pol Polarity setting |
43 | 43 | * @param pha Phase setting |
44 | 44 | */ |
45 | - AbstractSpiSlaveSpecifier(unsigned int pol, unsigned int pha); | |
45 | + SpiSlaveSpecifierStrategy(unsigned int pol, unsigned int pha); | |
46 | 46 | /** |
47 | 47 | * @brief Destructor |
48 | 48 | */ |
49 | - virtual ~AbstractSpiSlaveSpecifier(); | |
49 | + virtual ~SpiSlaveSpecifierStrategy(); | |
50 | 50 | /** |
51 | 51 | * @brief Chip select assertion |
52 | 52 | * @details |
@@ -87,4 +87,4 @@ class AbstractSpiSlaveSpecifier | ||
87 | 87 | |
88 | 88 | } /* namespace murasaki */ |
89 | 89 | |
90 | -#endif /* ABSTRACTSPISLAVESPECIFIER_HPP_ */ | |
90 | +#endif /* SPISLAVESPECIFIERSTRATEGY_HPP_ */ |
@@ -1,13 +1,13 @@ | ||
1 | 1 | /** |
2 | - * @file abstractspimaster.hpp | |
2 | + * @file spislavestrategy.hpp | |
3 | 3 | * |
4 | 4 | * @date 2018/02/11 |
5 | 5 | * @author: takemasa |
6 | 6 | * @brief SPI master root class. |
7 | 7 | */ |
8 | 8 | |
9 | -#ifndef ABSTRACTSPISLAVE_HPP_ | |
10 | -#define ABSTRACTSPISLAVE_HPP_ | |
9 | +#ifndef SPISLAVESTRATEGY_HPP_ | |
10 | +#define SPISLAVESTRATEGY_HPP_ | |
11 | 11 | |
12 | 12 | #include <peripheralstrategy.hpp> |
13 | 13 |
@@ -20,7 +20,7 @@ namespace murasaki { | ||
20 | 20 | * |
21 | 21 | * \ingroup MURASAKI_ABSTRACT_GROUP |
22 | 22 | */ |
23 | -class AbstractSpiSlave : public murasaki::PeripheralStrategy | |
23 | +class SpiSlaveStrategy : public murasaki::PeripheralStrategy | |
24 | 24 | { |
25 | 25 | public: |
26 | 26 | /** |
@@ -58,4 +58,4 @@ class AbstractSpiSlave : public murasaki::PeripheralStrategy | ||
58 | 58 | |
59 | 59 | } /* namespace murasaki */ |
60 | 60 | |
61 | -#endif /* ABSTRACTSPISLAVE_HPP_ */ | |
61 | +#endif /* SPISLAVESTRATEGY_HPP_ */ |