Skip to content
Prev Previous commit
Remove unused static functions
IAR generates warning Pe177 'function was declared but never referenced'.
  • Loading branch information
Ben Avison committed Sep 13, 2022
commit 443447f9e45c1ef847301fef9990ff0c35b825d0
9 changes: 0 additions & 9 deletions spi/max7219_32x8_spi/max7219_32x8_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ static inline void cs_deselect() {
#endif

#if defined(spi_default) && defined(PICO_DEFAULT_SPI_CSN_PIN)
static void write_register(uint8_t reg, uint8_t data) {
uint8_t buf[2];
buf[0] = reg;
buf[1] = data;
cs_select();
spi_write_blocking(spi_default, buf, 2);
cs_deselect();
sleep_ms(1);
}

static void write_register_all(uint8_t reg, uint8_t data) {
uint8_t buf[2];
Expand Down
10 changes: 0 additions & 10 deletions spi/max7219_8x7seg_spi/max7219_8x7seg_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ static inline void cs_deselect() {
#endif

#if defined(spi_default) && defined(PICO_DEFAULT_SPI_CSN_PIN)
static void write_register(uint8_t reg, uint8_t data) {
uint8_t buf[2];
buf[0] = reg;
buf[1] = data;
cs_select();
spi_write_blocking(spi_default, buf, 2);
cs_deselect();
sleep_ms(1);
}

static void write_register_all(uint8_t reg, uint8_t data) {
uint8_t buf[2];
buf[0] = reg;
Expand Down
12 changes: 0 additions & 12 deletions timer/timer_lowlevel/timer_lowlevel.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@
#include "hardware/timer.h"
#include "hardware/irq.h"

/// \tag::get_time[]
// Simplest form of getting 64 bit time from the timer.
// It isn't safe when called from 2 cores because of the latching
// so isn't implemented this way in the sdk
static uint64_t get_time(void) {
// Reading low latches the high value
uint32_t lo = timer_hw->timelr;
uint32_t hi = timer_hw->timehr;
return ((uint64_t) hi << 32u) | lo;
}
/// \end::get_time[]

/// \tag::alarm_standalone[]
// Use alarm 0
#define ALARM_NUM 0
Expand Down