src: Enable unused parameter warning

Fix warnings.
Some clang-formatting was necessary.
DebugPins is unused and was removed.
This commit is contained in:
Riku Isokoski
2022-12-30 23:31:31 +02:00
parent 8b0d888952
commit a3e14c012d
42 changed files with 110 additions and 168 deletions

View File

@@ -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);
}
}

View File

@@ -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

View File

@@ -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)

View File

@@ -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;