Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 2 additions & 19 deletions cpu/mips32r2_common/periph/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,6 @@ int timer_init(tim_t dev, unsigned long freq, timer_cb_t cb, void *arg)
return 0;
}

int timer_set(tim_t dev, int channel, unsigned int timeout)
{
assert(dev == 0);
assert(channel < CHANNELS);

(void)dev;

timeout >>= TIMER_ACCURACY_SHIFT;
timeout <<= TIMER_ACCURACY_SHIFT;

uint32_t status = irq_disable();
compares[channel] = counter + timeout;
irq_restore(status);

return channel;
}

int timer_set_absolute(tim_t dev, int channel, unsigned int value)
{
assert(dev == 0);
Expand All @@ -152,7 +135,7 @@ int timer_set_absolute(tim_t dev, int channel, unsigned int value)
compares[channel] = value;
irq_restore(status);

return channel;
return 1;
}

int timer_clear(tim_t dev, int channel)
Expand All @@ -166,7 +149,7 @@ int timer_clear(tim_t dev, int channel)
compares[channel] = 0;
irq_restore(status);

return channel;
return 1;
}

unsigned int timer_read(tim_t dev)
Expand Down
5 changes: 0 additions & 5 deletions cpu/mips_pic32_common/include/periph_cpu_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ enum {
PORT_G = 6, /**< port G */
};

/**
* @brief Prevent shared timer functions from being used
*/
#define PERIPH_TIMER_PROVIDES_SET

#ifdef __cplusplus
}
#endif
Expand Down