From f65c91dc4f61e3fa24e58dc3f93889c745277852 Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Sun, 27 Oct 2024 10:11:47 +0100 Subject: [PATCH] Created HR_C6000 class, subclass of HR_Cx000 --- platform/drivers/baseband/HR_C6000.h | 14 +++++++++++++- platform/drivers/baseband/HR_Cx000.h | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/platform/drivers/baseband/HR_C6000.h b/platform/drivers/baseband/HR_C6000.h index 2a195f32..b4b4b25e 100644 --- a/platform/drivers/baseband/HR_C6000.h +++ b/platform/drivers/baseband/HR_C6000.h @@ -34,6 +34,18 @@ enum class C6000_SpiOpModes : uint8_t AMBE1K = 7 ///< AMBE1000 configuration register. }; -using HR_C6000 = HR_Cx000 < C6000_SpiOpModes >; +class HR_C6000 : public HR_Cx000 < C6000_SpiOpModes > +{ +public: + + /** + * Constructor. + * + * @param uSpi: pointer to SPI device for "user" SPI interface. + * @param uCs: gpioPin object for "user" SPI chip select. + */ + HR_C6000(const struct spiDevice *uSpi, const struct gpioPin uCs) : + HR_Cx000< C6000_SpiOpModes >(uSpi, uCs) { } +}; #endif /* HRC6000_H */ diff --git a/platform/drivers/baseband/HR_Cx000.h b/platform/drivers/baseband/HR_Cx000.h index 74f50ae5..a5970e85 100644 --- a/platform/drivers/baseband/HR_Cx000.h +++ b/platform/drivers/baseband/HR_Cx000.h @@ -62,7 +62,8 @@ public: /** * Constructor. * - * @param dev: pointer to chip's hardware interface descriptor. + * @param uSpi: pointer to SPI device for "user" SPI interface. + * @param uCs: gpioPin object for "user" SPI chip select. */ HR_Cx000(const struct spiDevice *uSpi, const struct gpioPin uCs) : uSpi(uSpi), uCs(uCs) {