summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorRiku Isokoski <riksu9000@gmail.com>2022-12-30 23:31:31 +0200
committerRiku Isokoski <riksu9000@gmail.com>2023-01-24 10:43:17 +0200
commita3e14c012d76fc8f7ad4c16ad9dc67e8995ce10e (patch)
treeefd8d89f0d222d5db30e3cbd193e6d5f6111795b /src/drivers
parent8b0d888952bb3cfbf587ab20d5096f2e578a6107 (diff)
src: Enable unused parameter warning
Fix warnings. Some clang-formatting was necessary. DebugPins is unused and was removed.
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Bma421.cpp2
-rw-r--r--src/drivers/DebugPins.h24
-rw-r--r--src/drivers/SpiMaster.cpp7
-rw-r--r--src/drivers/SpiMaster.h5
4 files changed, 4 insertions, 34 deletions
diff --git a/src/drivers/Bma421.cpp b/src/drivers/Bma421.cpp
index 07a94329..84d76ab3 100644
--- a/src/drivers/Bma421.cpp
+++ b/src/drivers/Bma421.cpp
@@ -19,7 +19,7 @@ namespace {
return 0;
}
- void user_delay(uint32_t period_us, void* intf_ptr) {
+ void user_delay(uint32_t period_us, void* /*intf_ptr*/) {
nrf_delay_us(period_us);
}
}
diff --git a/src/drivers/DebugPins.h b/src/drivers/DebugPins.h
deleted file mode 100644
index b30cd222..00000000
--- a/src/drivers/DebugPins.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#pragma once
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-typedef enum {
- DebugPin0 = 27,
- DebugPin1 = 29,
- DebugPin2 = 20,
- DebugPin3 = 17,
- DebugPin4 = 11,
-} debugpins_pins;
-
-void debugpins_init();
-void debugpins_set(debugpins_pins pin);
-void debugpins_clear(debugpins_pins pin);
-void debugpins_pulse(debugpins_pins pin);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/src/drivers/SpiMaster.cpp b/src/drivers/SpiMaster.cpp
index 38f72fee..234884ab 100644
--- a/src/drivers/SpiMaster.cpp
+++ b/src/drivers/SpiMaster.cpp
@@ -163,10 +163,7 @@ void SpiMaster::PrepareTx(const volatile uint32_t bufferAddress, const volatile
spiBaseAddress->EVENTS_END = 0;
}
-void SpiMaster::PrepareRx(const volatile uint32_t cmdAddress,
- const volatile size_t cmdSize,
- const volatile uint32_t bufferAddress,
- const volatile size_t size) {
+void SpiMaster::PrepareRx(const volatile uint32_t bufferAddress, const volatile size_t size) {
spiBaseAddress->TXD.PTR = 0;
spiBaseAddress->TXD.MAXCNT = 0;
spiBaseAddress->TXD.LIST = 0;
@@ -234,7 +231,7 @@ bool SpiMaster::Read(uint8_t pinCsn, uint8_t* cmd, size_t cmdSize, uint8_t* data
while (spiBaseAddress->EVENTS_END == 0)
;
- PrepareRx((uint32_t) cmd, cmdSize, (uint32_t) data, dataSize);
+ PrepareRx((uint32_t) data, dataSize);
spiBaseAddress->TASKS_START = 1;
while (spiBaseAddress->EVENTS_END == 0)
diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h
index cba140a6..8b698c57 100644
--- a/src/drivers/SpiMaster.h
+++ b/src/drivers/SpiMaster.h
@@ -46,10 +46,7 @@ namespace Pinetime {
void SetupWorkaroundForFtpan58(NRF_SPIM_Type* spim, uint32_t ppi_channel, uint32_t gpiote_channel);
void DisableWorkaroundForFtpan58(NRF_SPIM_Type* spim, uint32_t ppi_channel, uint32_t gpiote_channel);
void PrepareTx(const volatile uint32_t bufferAddress, const volatile size_t size);
- void PrepareRx(const volatile uint32_t cmdAddress,
- const volatile size_t cmdSize,
- const volatile uint32_t bufferAddress,
- const volatile size_t size);
+ void PrepareRx(const volatile uint32_t bufferAddress, const volatile size_t size);
NRF_SPIM_Type* spiBaseAddress;
uint8_t pinCsn;