summaryrefslogtreecommitdiff
path: root/ucoo/hal/spi/spi_hard.stm32.hh
diff options
context:
space:
mode:
Diffstat (limited to 'ucoo/hal/spi/spi_hard.stm32.hh')
-rw-r--r--ucoo/hal/spi/spi_hard.stm32.hh21
1 files changed, 19 insertions, 2 deletions
diff --git a/ucoo/hal/spi/spi_hard.stm32.hh b/ucoo/hal/spi/spi_hard.stm32.hh
index 7576be5..13d24d3 100644
--- a/ucoo/hal/spi/spi_hard.stm32.hh
+++ b/ucoo/hal/spi/spi_hard.stm32.hh
@@ -24,6 +24,7 @@
//
// }}}
#include "ucoo/intf/spi_master.hh"
+#include "ucoo/arch/reg.hh"
namespace ucoo {
@@ -31,8 +32,24 @@ namespace ucoo {
class SpiHardMaster : public SpiMaster
{
public:
- /// Constructor for the Nth SPI.
- SpiHardMaster (int n);
+ enum class Instance
+ {
+ SPI1,
+ SPI2,
+ SPI3,
+#ifdef SPI4_BASE
+ SPI4,
+#endif
+#ifdef SPI5_BASE
+ SPI5,
+#endif
+#ifdef SPI6_BASE
+ SPI6,
+#endif
+ };
+ public:
+ /// Constructor for an SPI instance.
+ SpiHardMaster (Instance inst);
/// Destructor, disable.
~SpiHardMaster ();
/// See SpiMaster::enable.